This software offers Django Middleware and utilities that can effectively send a "PURGE" request to an upstream cache. It helps to streamline cache management and improve website performance. With just a few clicks, users can easily clear outdated contents and make updates faster.
What's interesting about django-cachepurge is that it's inspired by Plone CacheFu components, so you know it's based on a strong foundation.
To use this application, simply include 'django_cachepurge' in your INSTALLED_APPS setting. Make sure it's before any other application to avoid potential registration issues. Also, add the middleware CachePurge to your MIDDLEWARE_CLASSES setting.
Next, define CACHE_URLS in your Django settings. If you only have one cache, set it to an empty string. If you have multiple caches, set it to a tuple of cache URLs.
The URLs that need to be purged are extracted from model instances on the post_save signal. There are two possible sources: instance.get_absolute_url() and instance.get_purge_urls(). Either one of these methods can be used to provide a list of absolute paths.
Once you have everything set up, django-cachepurge will handle purging the cache asynchronously. If any exceptions occur, the URLs will not be purged. This way, you don't need to wait for all requests to complete before returning the response.
Overall, if you're looking for a reliable software solution for purging cache in Django, django-cachepurge is definitely worth checking out.
Version 0.1a: N/A