You are here

function KeyValueChainedFactory::backedByDatabase in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/KeyValueStore/KeyValueChainedFactory.php \Drupal\supercache\KeyValueStore\KeyValueChainedFactory::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 KeyValueChainedFactory::backedByDatabase()
KeyValueChainedFactory::get in src/KeyValueStore/KeyValueChainedFactory.php
Constructs a new key/value store for a given collection name.

File

src/KeyValueStore/KeyValueChainedFactory.php, line 67
Contains \Drupal\supercache\KeyValueStore\KeyValueChainedFactory.

Class

KeyValueChainedFactory
Defines the key/value store factory for the database 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;
}