This commit is contained in:
@@ -12,7 +12,7 @@ from services.memorycache import cache_region
|
||||
|
||||
@query.field('get_topics_all')
|
||||
def get_topics_all(_, _info):
|
||||
cache_key = "get_topics_all"
|
||||
cache_key = 'get_topics_all'
|
||||
|
||||
@cache_region.cache_on_arguments(cache_key)
|
||||
def _get_topics_all():
|
||||
@@ -23,7 +23,7 @@ def get_topics_all(_, _info):
|
||||
|
||||
@query.field('get_topics_by_community')
|
||||
def get_topics_by_community(_, _info, community_id: int):
|
||||
cache_key = f"get_topics_by_community_{community_id}"
|
||||
cache_key = f'get_topics_by_community_{community_id}'
|
||||
|
||||
@cache_region.cache_on_arguments(cache_key)
|
||||
def _get_topics_by_community():
|
||||
@@ -33,7 +33,6 @@ def get_topics_by_community(_, _info, community_id: int):
|
||||
return _get_topics_by_community()
|
||||
|
||||
|
||||
|
||||
@query.field('get_topics_by_author')
|
||||
async def get_topics_by_author(_, _info, author_id=0, slug='', user=''):
|
||||
q = select(Topic)
|
||||
|
Reference in New Issue
Block a user