#5815: Adds per-view cache refreshing (clearing)
-------------------------------------+------------------------------------
Reporter: k0001 | Owner: nobody
Type: New feature | Status: new
Component: Core (Cache system) | Version: dev
Severity: Normal | Resolution:
Keywords: cache refresh clear | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Comment (by Mike Lissner):
Just to add a data points here, I spent a bunch of time today trying to
figure out which key to delete to nuke a cached page and eventually gave
up and just nuked a larger part of the cache in hopes of getting lucky (I
did).
Having a helper util just to figure out what the cache key value is would
be really nice.
Here's a summary of my failed research:
- "Expire a view-cache in Django?"
(https://stackoverflow.com/q/2268417/64911) — Says it works with < django
1.7. I didn't try it, but I don't think it'd work.
- "How to invalidate cache_page in Django?"
(https://stackoverflow.com/q/33749369/64911) — Accepted answer just says
to cache the queryset instead of using cache_page.
- "How to manually clear/update a cached view in django"
(https://stackoverflow.com/q/47040438/64911) — Has a solution, but it's
quite old and doesn't work. This is when I gave up.
The reason I need this (and couldn't wait for the cache to just expire) is
because I use the db cache to cache really big sitemaps that don't change
very often. The cache is usually on the order of a couple of weeks.
--
Ticket URL: <https://code.djangoproject.com/ticket/5815#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018265d1cd2a-f9263e1b-6927-4ddf-96b9-4703c9179571-000000%40eu-central-1.amazonses.com.