Be aware that the way the cache key is constructed changed a bit. I'm also invalidating template fragments when models used for rendering changed, and found this while randomly reading changesets:
It used to be: fragment_name:additional:arguments:seperated:by:colons Now it is: template.cache.fragment_name.args where args is md5 (additional:arguments:seperated:by:colons) http://code.djangoproject.com/changeset?new=django%2Ftrunk%2Fdjango%2Ftemplatetags%2Fcache.py%4011068&old=django%2Ftrunk%2Fdjango%2Ftemplatetags%2Fcache.py%408533 On Aug 2, 10:25 am, Nick Fishman <bsdlogi...@bsdlogical.com> wrote: > I was wondering if it's possible to not specify the expiration time when > using the {% cache %} tag to cache template fragments. With the low-level > API, cache entries will expire after a timeout configured in CACHE_BACKEND. > Is it possible to use the same default when caching template fragments? > > In particular, I'd like to use model signals to invalidate cache entries. > That way, entries won't be invalidated after an arbitrary time period, but > rather when they're actually invalid. Nathaniel Whiteinge wrote on > 2008-12-03 that the {% cache %} tag creates entries with keys > "fragment_name:additional:arguments:seperated:by:colons", so this seems > possible. > > Any thoughts? > > Nick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---