On Sat, 2010-01-09 at 10:26 +0700, Stuart Bishop wrote: > > On Fri, Jan 8, 2010 at 6:27 PM, Guilherme Salgado <[email protected]> > wrote: > > > We'll have a bunch of callsites for the utility > > (DatabaseConfig.main_master/slave, model/pofile.py, webapp/adapter.py, > > webapp/authorization.py, webapp/dbpolicy.py, and others), and nearly all > > of them would benefit from a cache in the request, so I'd rather do it > > in the utility. > > If you are caching the request, you need to use a thread global. The reason > you are caching the request is so you can access a request annotation. Why > not just store your information in a thread global instead of a request > annotation? >
I'm not caching the request itself -- I just want to cache the read-only flag (when a request exists) so that we don't make more than one stat() calls during a single request. -- Guilherme Salgado <[email protected]>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

