You are here

function KeyValueChainedExpirableFactory::backedByDatabase in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/KeyValueStore/KeyValueChainedExpirableFactory.php \Drupal\supercache\KeyValueStore\KeyValueChainedExpirableFactory::backedByDatabase()

Not very reliabled but.... we want to prevent this thing from triggering if the cache factory is going to return us a cache backend that sits on top of the database...

1 call to KeyValueChainedExpirableFactory::backedByDatabase()
KeyValueChainedExpirableFactory::get in src/KeyValueStore/KeyValueChainedExpirableFactory.php
Constructs a new expirable key/value store for a given collection name.

File

src/KeyValueStore/KeyValueChainedExpirableFactory.php, line 76
Contains \Drupal\supercache\KeyValueStore\KeyValueWincacheExpirableFactory.

Class

KeyValueChainedExpirableFactory
Defines the key/value store factory for the wincache/databse backend.

Namespace

Drupal\supercache\KeyValueStore

Code

function backedByDatabase() {
  if (!isset($this->backed_by_database)) {
    $this->backed_by_database = $this->factory
      ->get('test-binary') instanceof \Drupal\Core\Cache\DatabaseBackend;
  }
  return $this->backed_by_database;
}