I use it in the view code. First I tried the query caching example in the SQLAlchemy manual (in the Examples section). It worked but I didn't like how it serialzed the SQL and params into a key. I prefer semantic keys. The value is just pickled result, so it reduces to a simple string:string setting. I haven't tried the cache decorators but I may use them sometime. I'm still deciding what to cache at what level. The primary thing I'm caching is the user's groups for the groupfinder, so that it doesn't do a 1:many database query every request.
On Wed, Mar 11, 2015 at 8:39 PM, Jonathan Vanasco <[email protected]> wrote: > how are you using it ? > > my caching decorator is actually dogpile's > @cache_region.cache_on_arguments() > > the only way i could leverage it is with an internal generator function. > otherwise there is always a cache miss (`request` would end up in the cache > key, and is unique). > > that works, but i have that ugly manual response bit. it makes me feel like > i'm re-inventing the wheel or doing something wrong. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/d/optout. -- Mike Orr <[email protected]> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
