Hi all, I'm trying to create cache decorator for logged out user. Below is
the snippet.
def logout_cache(*args, **kwargs):
from pylons import session
if session.get('user', None):
return lambda f: f
else:
return beaker_cache(*args, **kwargs)
# This is how I call it inside controller
@logout_cache(query_args=True)
def most_recent(self):
pass
Unfortunately, even though session['user'] is not None, Pylons is still
rendering the cached page. I must be doing something really stupid?
- Didip -
--
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.