This is on my todo list and its been rolling around my head for awhile.
I assume it is a common use case but I can't find where to get started.
Most of our users have one or more of a small set of roles. In the
legacy system, they login, are authenticated against a db, and a session
cookie is set. Roles are checked before pages are generated.
The menu pages that are displayed are the same for each role. What I'd
like to do is cache these menu pages and not have to check the db and
regenerate each time.
My extremely rough sketch pseudocode:
On Login:
Create session object
select roles for user from db
for each role add to session (dictionary?)
On page request
if user has role for requested page
if cached page exists
display cached page
if page is a menu page
cache page
I understand the users, roles, db and cookies side of it but it is the
mechanics of having 'pages cached by group not individual session' in
myghty or mako and pylons/python that is throwing me a little. If anyone
can shed a little light as to the specifics of implementation or give
pointers I'd appreciate it.
I think I want to use authkit and beaker but how?
It also strikes me that this is probably a great place to be taking
advantage of sqlalchemy's orm features but again how? I've just used
sqlalchemy with explicit sql so far, but here is somewhere where the
cost of learning how to use the orm features might be worth the cost.
Cheers,
John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---