Version 1
[yaffs-website] / web / core / modules / views / src / Plugin / views / cache / Tag.php
diff --git a/web/core/modules/views/src/Plugin/views/cache/Tag.php b/web/core/modules/views/src/Plugin/views/cache/Tag.php
new file mode 100644 (file)
index 0000000..cc542c2
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Drupal\views\Plugin\views\cache;
+
+use Drupal\Core\Cache\CacheBackendInterface;
+
+/**
+ * Simple caching of query results for Views displays.
+ *
+ * @ingroup views_cache_plugins
+ *
+ * @ViewsCache(
+ *   id = "tag",
+ *   title = @Translation("Tag based"),
+ *   help = @Translation("Tag based caching of data. Caches will persist until any related cache tags are invalidated.")
+ * )
+ */
+class Tag extends CachePluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function summaryTitle() {
+    return $this->t('Tag');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function cacheExpire($type) {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getDefaultCacheMaxAge() {
+    return CacheBackendInterface::CACHE_PERMANENT;
+  }
+
+}