Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cache sql query results using dogpile/beaker #2353

@joetsoi

Description

@joetsoi

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

http://beaker.readthedocs.org/en/latest/configuration.html
http://dogpilecache.readthedocs.org/en/latest/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions