well it seems
my suspicion was right. there are problems in mako caching, and a new version is released. here's the
message sent by michael bayer.
This release contains a critical fix for anyone using caching in conjunction with expire time; more critical in 0.2, but possibly critical for others using 0.1. The bug is really a two-parter, part of which has existed in all the 0.1 versions and leads me to believe that caching is not used very deeply since its fairly easy to encounter.
1. in all versions of mako prior to 0.2.2, if you had a cached block with an expire=<something>, when the block of content refreshed itself on expire, whatever Context was in use when the block was first called in the Python process is what gets used for the refresh...meaning if the template was first served from a particular Python process at 1:00pm, and the cache expired an hour later, if the same Python process were still running, it would refresh the content using the Context from 1:00 pm.
2. in mako version 0.2.0 and above, an implementation detail changed which made this behavior apparent via an IndexError.
So the implementation detail in #2 was fixed, but then I went further and fixed #1 as well.