From 4ec0d8fe15943aa1117efcdcb861708087471a1b Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 6 Mar 2023 10:01:32 +0100 Subject: [PATCH] Proxito: use cacheops for 2 more models `Organization` and `PlanFeature` weren't being cached by `cacheops` and they are used when serving documentation. By caching these, we will be caching all the models used when serving documentation, reducing the db hits and a also a litte the response time. --- readthedocs/settings/base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py index daa0b1bdff5..c73f5b4ac48 100644 --- a/readthedocs/settings/base.py +++ b/readthedocs/settings/base.py @@ -1055,4 +1055,14 @@ def DOCKER_LIMITS(self): 'ops': CACHEOPS_OPS, 'timeout': CACHEOPS_TIMEOUT, }, + + # readthedocs.organizations.* + 'organizations.organization': { + 'ops': CACHEOPS_OPS, + 'timeout': CACHEOPS_TIMEOUT, + }, + 'organizations.planfeature': { + 'ops': CACHEOPS_OPS, + 'timeout': CACHEOPS_TIMEOUT, + }, }