Template Cashing

0 views
Skip to first unread message

alex_zh

unread,
Nov 9, 2009, 7:10:36 AM11/9/09
to pylons-discuss
Hello.
I have a problem with caching of templates. Sometimes users get the
pages, that opened before. I don't khow the reason.
Is it possible to turn off all the caching in whole pylons-project?

Didip Kerabat

unread,
Nov 9, 2009, 10:13:12 PM11/9/09
to pylons-...@googlegroups.com
As far as I know, Pylons does not enable caching by default (including template caching).

You can turn off caching by not configuring beaker.cache.* inside .ini file.

There are a couple of places you can also check:
* your render() method might contain cache_expire
* some of your mako files may contain function that defines cached=True.

- Didip -

alex_zh

unread,
Nov 10, 2009, 3:22:35 AM11/10/09
to pylons-discuss
#baker.cache... is commented in development.ini

Also, add
response.headers['Cache-Control'] = 'no-store'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = datetime.datetime.now
().strftime("%a, %d %b %Y %H:%M:%S GMT")
return render('derived/room/index.mako')
But nothing has changed.

Maybe something wrong.. Is any other ways?
Reply all
Reply to author
Forward
0 new messages