Replies: 0 comments 1 reply
-
This is implemented as a part of the issue: https://github.com/factly/dega-api/issues/60 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, we do not have any caching over the database and it would help for performance and decrease load on Postgres if we were to implement caching through Redis.
It is important to define what to cache in Redis and it would probably depend on the most expensive queries especially when retrieving the posts and fact checks. Challenge is also using the correct cache invalidation technique.
I am thinking we could use GORM Hooks to invalidate the cache when writing in dega-server, so dega-api always responds with the fresh data. Per @hetjagani we might have to implement it the same way as we do with indexing meilisearch.
But the larger question would be if GORM supports getting the data from Redis? I did not see any examples or related documentation regarding the same but here are a few places where the possibility of using Redis Caching is mentioned on GORM
All issues above are closed without any proper direction, so I am thinking it would not be a straightforward task.
Beta Was this translation helpful? Give feedback.
All reactions