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
{{ message }}
Repository navigation
cache sql query results using dogpile/beaker #2353
I don't believe we actually cache any of our sql queries, as a result we end up with repeated requests, for example model.User.get() is run when we run check_access anywhere in the templates, so on some pages we end up fetching the user a couple of dozen times.
I haven't had an indepth look, but we have the beaker caching middleware enabled, but as far as I can tell, we don't actually use it anywhere to cache results returned by sqlalchemy. The sqlalchemy docs now recommend using dogpile over beaker I think both were at some point written by the sqlalchemy guys
Activity
rossjones commentedon Mar 1, 2016
This is worse than it appears, as we were actively avoiding the local sqlalchemy 'cache'.
For .get() calls this should be fixed by #2824 and #2825 where the ID is passed (because the 'cache' is an identity map on the PK).
[ckan#2353] remove regex, update pysolr version
[ckan#2353] fix requirements.in
[ckan#2353] fix solr error messages