diff core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\Component\FileCache;
+
+/**
+ * Defines an interface inspired by APCu for FileCache backends.
+ */
+interface FileCacheBackendInterface {
+
+  /**
+   * Fetches data from the cache backend.
+   *
+   * @param array $cids
+   *   The cache IDs to fetch.
+   *
+   * @return array
+   *   An array containing cache entries keyed by cache ID.
+   */
+  public function fetch(array $cids);
+
+  /**
+   * Stores data into a cache backend.
+   *
+   * @param string $cid
+   *   The cache ID to store data to.
+   * @param mixed $data
+   *   The data to store.
+   */
+  public function store($cid, $data);
+
+  /**
+   * Deletes data from a cache backend.
+   *
+   * @param string $cid
+   *   The cache ID to delete.
+   */
+  public function delete($cid);
+
+}