Description

cache_page can also take an optional keyword argument, cache, which directs the decorator to use a specific cache alias when caching view results. By default, the default alias will be used, but you can specify any cache alias you want

I assume this means I can specify the cache_key to use. So, like the docs state I try this out:

@cache_page(60 * 15, cache="special_cache")
def my_view(request):

....

As soon as I do this I get a ValueError with the following exception & traceback:

Change History (6)

Reading the docs and the traceback, I believe a misunderstanding is at work. The cache argument is, I think, a hint for which cache backend (or 'alias' in the new CACHES dictionary) to utilise; this seems borne out by the traceback, but I do think the documentation wording could be clarified.