W3cubDocs

/Drupal 8

trait UseCacheBackendTrait

Provides methods to use a cache backend while respecting a 'use caches' flag.

Hierarchy

File

core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 8

Namespace

Drupal\Core\Cache

Members

Name Modifiers Type Description
UseCacheBackendTrait::$cacheBackend protected property Cache backend instance.
UseCacheBackendTrait::$useCaches protected property Flag whether caches should be used or skipped.
UseCacheBackendTrait::cacheGet protected function Fetches from the cache backend, respecting the use caches flag.
UseCacheBackendTrait::cacheSet protected function Stores data in the persistent cache, respecting the use caches flag.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!UseCacheBackendTrait.php/trait/UseCacheBackendTrait/8.1.x