Invalidate template fragment cache in Django 1.5

Django 1.5 does not have a utility method to delete template fragment cache, with arguments.

In order to achieve this, you must create a custom method:

Example usage:

… and delete the cache:

 

In django 1.6+ you can do this more easy: