Re: Caching user and auth data

2010-11-18 Thread Joe Kondel
http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-cached-sessions You'd want to use the write-through suggested by first configuring something like memcached, and then follow: "For persistent, cached data, set SESSION_ENGINE

Re: Caching user and auth data

2010-11-17 Thread Joe Kondel
I would second Russ' memcached recommendation. We use custom authorization modules that do some obj level lookups in addition to some other ACL type stuff. We've cut down seriously on the amount of DB hits by: 1- Caching a lot of the more static type of authorization rulesets ( the ACLs ) 2- Usin

Re: Caching user and auth data

2010-11-17 Thread Russ B.
Authorize them against the DB the first time, then attach some flag to their session that represents "authorized" that your views check on instead of having them work with the auth models (or however you're doing it). If the "authorized" flag doesn't exist, redirect them to the login page. You may