You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use django-cacheops to speed up serving docs and support DB going down
`django-cacheops` allows us to cache querysets into a redis backend in a
granular way. We can define which models we want to cache and we can
specify which instances (el proxito, web, workers, etc) will use this
cache and which of them will invalidate it.
This initial approach configure El Proxito to make usage of this cache
when performing queries and configure Web/Celery/Build instances only
to invalidate the cache when a model changed.
This setup allows us to serve docs faster but also keep serving docs
during `CACHEOPS_TIMEOUT` seconds even when the DB goes down.
Because the way it's configured now (web is not using the cache), when
the DB goes down, the footer API call will fail and the flyout menu
won't be replaced properly. We could change this if we want by
performing Manual caching on that view or by enabling cacheops in Web
instance as well.
0 commit comments