Skip to content

Commit

Permalink
Proxito: use cacheops for 2 more models (#10106)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
humitos authored Mar 6, 2023
1 parent 2a4a3e3 commit bc8aa71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}

0 comments on commit bc8aa71

Please sign in to comment.