Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm using memcache on my server (see #1121034: Default (simple) config for Drupal 7).
If I set a view to cache its output, filters (or arguments) are not considered: the first called is the cached one and all forthcoming requests are giving a very fast response with the same – cached – output, no matter if there is a different argument passed…
Is there any configuration I'm missing…? How can I tell views to cache accordingly to exposed filters or arguments received?
Comments
Comment #1
dawehnerIf this is related to Memcache, views can't do something, but this is probably a problem with caching itself
Comment #2
tomgf CreditAttribution: tomgf commentedIsn't there any way of setting a key…? For instance I am setting this in my settings.php file to separate the cache for different websites, in a multi-site environment:
$conf['memcache_key_prefix'] = 'UNIQUE_TO_THIS_WEBSITE';
Thinking about arguments,
http://hostname.tld/view/display/{%ARGUMENT}
is unique and related to the argument value…Aside Memcache, how is this working with other caching settings…?
Comment #3
dawehnerViews generates a cache key based on some values, for example the current user rules etc.
This cache key is used when retrieving the cache.
Comment #4
dawehnerThis could be a duplicate of #997096: Disable caching on views that output forms
Comment #5
tomgf CreditAttribution: tomgf commentedI had the time to check how these keys are created. So far, I don't see any reference to an argument – or reference to an exposed filter – on these two functions:
function get_results_key()
andfunction get_output_key()
.I also found out that there is a proposed patch here #1055616: Query arguments should be replaced before generating cache ID, which is helping in some cases but also ignoring arguments (as far as I understand).
I will add an extra line to the proposed patch there to incorporate arguments in the key creation process.
Comment #6
johnvmarking as duplicate of #1055616: Query arguments should be replaced before generating cache ID .
@tomgf, IMO it also addresses arguments, (CU over there :-) )