mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2026-03-03 15:10:51 +01:00
Add random caching
This commit is contained in:
@@ -48,7 +48,7 @@ class AuthorTGRMSearchService(TRGMSearchService):
|
||||
GET_OBJECT_IDS_QUERY = GET_OBJECT_IDS_QUERY
|
||||
|
||||
|
||||
GET_OBJECT_ID_QUERY = """
|
||||
GET_OBJECTS_ID_QUERY = """
|
||||
WITH filtered_authors AS (
|
||||
SELECT id FROM authors
|
||||
WHERE EXISTS (
|
||||
@@ -64,7 +64,7 @@ SELECT id FROM filtered_authors;
|
||||
|
||||
class GetRandomAuthorService(GetRandomService):
|
||||
MODEL_CLASS = Author
|
||||
GET_OBJECT_ID_QUERY = GET_OBJECT_ID_QUERY
|
||||
GET_OBJECTS_ID_QUERY = GET_OBJECTS_ID_QUERY
|
||||
|
||||
|
||||
class AuthorMeiliSearchService(MeiliSearchService):
|
||||
|
||||
Reference in New Issue
Block a user