You are here

class views_plugin_cache_rules in Cache Actions 6.2

Same name and namespace in other branches
  1. 6 views_plugin_cache_rules.inc \views_plugin_cache_rules
  2. 7 views_plugin_cache_rules.inc \views_plugin_cache_rules

Plugin that caches views infinitely. This is not really that useful unless you want rules to invalidate your cache.

Hierarchy

Expanded class hierarchy of views_plugin_cache_rules

1 string reference to 'views_plugin_cache_rules'
cache_actions_views_plugins in ./cache_actions.views.inc
Implementation of hook_views_plugins().

File

./views_plugin_cache_rules.inc, line 12
This file contains a cache that just implements the views cache plugin.

View source
class views_plugin_cache_rules extends views_plugin_cache {
  function summary_title() {
    return t('Rules');
  }

  /**
   * Since rules will be triggering our cache invalidation,
   * the cache will never expire.
   * @param $type
   * @return always FALSE.
   */
  function cache_expire($type) {
    return FALSE;
  }

  /**
   * We override the default caching mechanism, since it nukes everything.
   * We are just going to flush the actual display.
   */
  function cache_flush() {
    cache_clear_all($this->view->name . ':' . $this->display->id, $this->table, TRUE);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
views_plugin_cache_rules::cache_expire function Since rules will be triggering our cache invalidation, the cache will never expire.
views_plugin_cache_rules::cache_flush function We override the default caching mechanism, since it nukes everything. We are just going to flush the actual display.
views_plugin_cache_rules::summary_title function