1 2 3 4 5 6 7 8 9 10 | from django.core.cache import cache
from django.http import HttpRequest
from django.utils.cache import get_cache_key
def expire_page(path):
request = HttpRequest()
request.path = path
key = get_cache_key(request)
if cache.has_key(key):
cache.delete(key)
|
More like this
- Binding signals to abstract models by andreterra 1 year ago
- Trigger a user password change by jedie 5 years, 8 months ago
- Execute a signal once by johnnoone 4 years ago
- SnippySnip by youell 4 years, 10 months ago
- Scoped Cache Compatible with Django Caching Helpers by axiak 5 years, 2 months ago
Comments