interface FileCacheBackendInterface

Same name in other branches
  1. 9 core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php \Drupal\Component\FileCache\FileCacheBackendInterface
  2. 10 core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php \Drupal\Component\FileCache\FileCacheBackendInterface
  3. 11.x core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php \Drupal\Component\FileCache\FileCacheBackendInterface

Defines an interface inspired by APCu for FileCache backends.

Hierarchy

Expanded class hierarchy of FileCacheBackendInterface

All classes that implement FileCacheBackendInterface

1 file declares its use of FileCacheBackendInterface
StaticFileCacheBackend.php in core/tests/Drupal/Tests/Component/FileCache/StaticFileCacheBackend.php

File

core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php, line 8

Namespace

Drupal\Component\FileCache
View source
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);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
FileCacheBackendInterface::delete public function Deletes data from a cache backend. 2
FileCacheBackendInterface::fetch public function Fetches data from the cache backend. 2
FileCacheBackendInterface::store public function Stores data into a cache backend. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.