﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5815	Adds per-view cache refreshing (clearing)	k0001	Ramiro Nocelli	"This patch adds the possibility to clear(refresh) cached data per view.

SmileyChris sugested it would be good to add another key to the cached keys where we could keep track of all the different cache_page_key hashes, so we that can delete those then.

It is possible to clear the cache for an specific view, to achieve that, you 
should tell your view's url path (and optionally, a key_prefix) to 
``clear_cache_for_path(path, key_prefix=None)``.

{{{
    from django.utils.cache import clear_cache_for_path
    
    # clear the all cached data for path '/blog/posts/2/'
    clear_cache_for_path('/blog/posts/2/')
}}}

Note that it will delete every page cached from matching this path, ``Vary`` headers
doesn't matter.

NOTE: Thanks SmileyChris for your help and supervision with this."	New feature	assigned	Core (Cache system)	dev	Normal		cache refresh clear	Petr Přikryl	Accepted	1	0	0	1	0	0
