Hello,

Views are seem to be normally cached into memcache, but when I configured a rule for clearing specific view cache, it didn't work. I retested it with drupal database cache and it was working as expected.
Then I also found out that with enabled memcache, default views "clear cache" button on the /admin/structure/views/settings/advanced page doesn't work neither.
"Clear all caches" button on the performance page works ok, but we need to configure clearing cache for a particular view.

I would appreciate it very much if you could look into this issue.

Many thanks,
Dmitry

Comments

catch’s picture

Status: Active » Postponed (maintainer needs more info)

Please try the latest dev, several issues with cache clearing were fixed.

zhgenti’s picture

Hello @catch, just pulled latest revision 57f445, but seems like cache clearing issue is still there. Can't clear views cache with the following code, which is in the cache actions module.

function _cache_actions_clear_view_display($view, $display) {
  // We use the cache plugin to clear the cache.
  $view->set_display($display->id);
  $cache_plugin = views_get_plugin('cache', $display->display_options['cache']['type']);
  // If we have a cache plugin, then initiate it and flush the cache.
  if (isset($cache_plugin)) {
    $cache_plugin->init($view, $display);
    $cache_plugin->cache_flush();
  }
}

call of this function via devel/php also doesn't clear cache in the memcache bin.

cache_clear_all('news_stream', 'cache_views_data', TRUE);

This function, which is supposed to clear cache of particular panel also doesn't work. table is "cache"

function _cache_actions_clear_pane_cache($pane, $display) {
  // Clearing panes can't be used with any other plugin than the rules plugin.
  if ($pane->cache['method'] == 'rules') {
    $function = panels_plugin_get_function('cache', $pane->cache['method'], 'cache clear');
    // Specify the pane to clear. This is specific for the rules plugin.
    $display->clear_pane = $pane;
    if ($function) {
      $function($display);
    }
  }
}

Hope this information will help you to fix the issue.
Thanks a lot for your geat efforts on this project.
Dmitry

catch’s picture

Note that clearing the cache in memcache does not actually empty the bin, it sets a variable that invalidates the cache item, so that the next cache_get() returns FALSE. So if you're trying to inspect what memcache is actually doing to diagnose this, that's not going to work well - you'd be better off checking the 'created' time of cache items from cache_get().

jeffsheltren’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closing due to lack of activity, but please re-open if you are still having problems.

szantog’s picture

Status: Closed (works as designed) » Active

The problem is still exists in the latest dev. Have a view with a simple time based cache, and an action, which clear these caches on voting (by votingapi). Without memcache, cache is cleared as well, if set up memcache, nothing to happen.

What info do you need?

jeremy’s picture

Issue summary: View changes
Status: Active » Fixed

There's been a number of fixes made in the past couple of years, affecting cache flushing. Please grab the latest release (7.x-1.4-beta1 or later) and let us know if there's still a problem. I'm unable to duplicate in my testing.

Status: Fixed » Closed (fixed)

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