Mako 0.2.2 Released

2 views
Skip to first unread message

Michael Bayer

unread,
Jun 23, 2008, 1:52:06 PM6/23/08
to mako-d...@googlegroups.com
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:00
pm, 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.

Download Mako 0.2.2 at: http://www.makotemplates.org/download.html


Alexandre Conrad

unread,
Jun 26, 2008, 5:07:12 AM6/26/08
to mako-d...@googlegroups.com
Michael Bayer wrote:

> 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.

FYI: I'm slowly putting my app in production. I've been benchmarking
mako and it turns out I started to use its caching capabilities. But I'm
not using the timer mecanism as I need "real time" results when the user
interacts. So I've only been caching "static" chunks of a page
(footer/header, and a few things like that). It's not much, but still I
gain some CPU performance.

Regards,
--
Alexandre CONRAD

Reply all
Reply to author
Forward
0 new messages