cache user groups

14 views
Skip to first unread message

Antonio Beamud Montero

unread,
Feb 22, 2012, 7:25:43 AM2/22/12
to pylons-discuss
It's ok cache the user groups? like

@cache.region('short_term', 'groupfinder')
def groupfinder(...):

Or it's better approach use the session, to check the user info is in
the user session, before invoke the sqlalchemy machinery?

Greetings.

Jason

unread,
Feb 22, 2012, 9:58:45 AM2/22/12
to pylons-...@googlegroups.com
The only problem that I see with this is if you want to remove a user from a group it's not going to propagate to your application immediately unless you remember to clear that cache at the same time. This could be a security issue if you remove a user's credentials and they are still able to access a now forbidden area for a short time.

-- Jason
Reply all
Reply to author
Forward
0 new messages