its something I've been considering adding an API for. Currently it
would look something like (this is against latest trunk):
template = lookup.get_template("/path/to/my/template.mako")
cache = template.module._template_cache
cache._get_container(keyname, type="file").clear_value()
"keyname" is the name of the def ("body" for the whole page) or
whatever key you use for cache_key.
>
>
>
> On Sep 23, 5:53 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
>> its something I've been considering adding an API for. Currently it
>> would look something like (this is against latest trunk):
>>
>
> Consider it requested! I had a feeling you were already on top of it.
maybe if you want to add a trac ticket to remind me. not sure when I
can get to this.
>
>
>
> On Sep 30, 9:41 am, Isaac Csandl <nerk...@gmail.com> wrote:
>> On Sep 29, 2:30 pm, Isaac Csandl <nerk...@gmail.com> wrote:
>>
>>> On Sep 27, 9:56 am, Michael Bayer <mike...@zzzcomputing.com> wrote:
>>
>>>> OK, check out this feature inhttp://www.makotemplates.org/trac/changeset/405
>>>> . You'd have to get at your Pylons-configured TemplateLookup to
>>>> get at the Template.
>> It works! Thanks again.
>
> Update:
>
> mytemplate.cache.invalidate('somekey') works, but invalidate_def
> appears not to. There's no error message, but the def shows the same
> data until the cache expires. (I'm testing using FF with WebDev
> extension set to disable cache, to rule out browser caching)
>
does your <%def> use cache_key ? the feature isn't looking at custom
cache_keys right now.