I recently jumped on a project using Pylons. I’m not familiar with either Python or Pylons, but I haven’t had very much trouble getting the hang of things.
Pylon projects seem to cache templates indefinitely by default and I can’t figure out a way to clear the cached templates (stored by default in /data/templates) except by manually deleting them and restarting the server.
Better yet, can template caching be disabled?
The page, http://wiki.pylonshq.com/display/pylonsdocs/Caching+in+Templates+and+Controllers, on template caching doesn’t seem helpful and there’s a brief mention of disabling cache globally by setting in the .ini file:
cache_enabled = false
But it doesn’t seem to work.
This should be relatively straight-forward, shouldn’t it?
The problem was entirely something else..
Pylons always caches templates, but updates its template cache automatically by comparing the last-modified timestamp of the template and its cached version. The problem had to do with synchronizing the server’s clock with real time.
It was a couple minutes ahead and uploads from my computer (with a synchronized clock) would pull the template’s timestamp back a couple of minutes; Pylons would interpret that as the template being older than the cached version and not update the cache.