1 cache.inc BackdropDatabaseCache::__construct($bin)

Constructs a new BackdropDatabaseCache object.

File

core/includes/cache.inc, line 440
Functions and interfaces for cache handling.

Class

BackdropDatabaseCache
Defines a default cache implementation.

Code

function __construct($bin) {
  // All cache tables should be prefixed with 'cache_', except for the
  // default 'cache' bin.
  if ($bin != 'cache') {
    $bin = 'cache_' . $bin;
  }
  $this->bin = $bin;

  // Bootstrap the database if it is not yet available.
  if (!function_exists('db_query') || backdrop_get_bootstrap_phase() < BACKDROP_BOOTSTRAP_DATABASE) {
    backdrop_bootstrap(BACKDROP_BOOTSTRAP_DATABASE, FALSE);
  }
}