tedtieken/django-template-reset-cache — Issue #1: Invalidation happens only at template compile time
Author: akaihola
Created: 2012-02-27 11:14:09+00:00
State: open

The `invalidate_template_cache()` function is called inside the `reset_cache()` function, which in turn is registered as a template tag.

If I've understood correctly, Django executes the `reset_cache()` function only at template compile time. Because of this, `invalidate_template_cache()` is also called at compile time but never at render time.

Anything that needs to be done at render time should be in the `.render()` method of a `template.Node` subclass, and an instance of that class should be returned by the `reset_cache()` function.

I can't see how the tag could work as intended the way it's now implemented.