The cache key (created in domain_views_plugin_cache_time->get_results_key()) is ALWAYS unique, because the build info creates a timestamp (in the wildcard ...['views_substitutions']['***CURRENT_TIME***']).

I'm not sure how the cache key should be created, but it shouldn't contain a timestamp =)

Comments

agentrickard’s picture

Fascinating. I didn't write that patch. Can we key off $_domain['machine_name']?

rudiedirkx’s picture

The key needs something View specific. I dont know how much. Less than the View's entire build info. Maybe the build info minus arguments/wildcards/placeholders? Or maybe just the view name + display name (technically enough).

agentrickard’s picture

The problem is that Views is passing a QuerySelect object, not a query string.

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Here's a patch that removes the ***CURRENT_TIME*** element from the cache key. Should work.

agentrickard’s picture

StatusFileSize
new1.67 KB

Better, more complete patch.

rudiedirkx’s picture

Status: Needs review » Reviewed & tested by the community

As expected, that does it. In this case only the CURRENT_TIME placeholder was too variable. I can image there are more placeholders too variable though...

agentrickard’s picture

Hard to say. Much of the data there is necessary to alter the access query. It _may_ be that even removing the timestamp is a bad idea.

rudiedirkx’s picture

Removing it from the build_info would be a bad idea, yes, but you don't. Removing it from the cache hash is necessary, otherwise the cache class is useless.

agentrickard’s picture

Let's go ahead and commit this, then.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed
  bc2b57e..6737170  7.x-1.x -> 7.x-1.x
rudiedirkx’s picture

Damn, you're fast. Good stuff.

agentrickard’s picture

I don't consider 19 days to be "fast" by any measure.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.