class DrupalFakeCache

  1. cis7 includes/ DrupalFakeCache
  2. cle7 includes/ DrupalFakeCache
  3. elmsmedia7 includes/ DrupalFakeCache
  4. icor7 includes/ DrupalFakeCache
  5. meedjum_blog7 includes/ DrupalFakeCache
  6. mooc7 includes/ DrupalFakeCache

Defines a stub cache implementation to be used during installation.

The stub implementation is needed when database access is not yet available. Because Drupal's caching system never requires that cached data be present, these stub functions can short-circuit the process and sidestep the need for any persistent storage. Obviously, using this cache implementation during normal operations would have a negative impact on performance.


Expanded class hierarchy of DrupalFakeCache


Contains filters are case sensitive
Namesort descending Modifiers Type Description
DrupalDatabaseCache::$bin protected property
DrupalDatabaseCache::garbageCollection protected function Garbage collection for get() and getMultiple().
DrupalDatabaseCache::isValidBin function Checks if $this->bin represents a valid cache table.
DrupalDatabaseCache::prepareItem protected function Prepares a cached item.
DrupalDatabaseCache::__construct function Constructs a DrupalDatabaseCache object.
DrupalFakeCache::clear function Overrides DrupalDatabaseCache::clear().
DrupalFakeCache::get function Overrides DrupalDatabaseCache::get().
DrupalFakeCache::getMultiple function Overrides DrupalDatabaseCache::getMultiple().
DrupalFakeCache::isEmpty function Overrides DrupalDatabaseCache::isEmpty().
DrupalFakeCache::set function Overrides DrupalDatabaseCache::set().


includes/, line 17
Provides a stub cache implementation to be used during installation.

View source
class DrupalFakeCache extends DrupalDatabaseCache implements DrupalCacheInterface {

   * Overrides DrupalDatabaseCache::get().
  function get($cid) {
    return FALSE;

   * Overrides DrupalDatabaseCache::getMultiple().
  function getMultiple(&$cids) {
    return array();

   * Overrides DrupalDatabaseCache::set().
  function set($cid, $data, $expire = CACHE_PERMANENT) {

   * Overrides DrupalDatabaseCache::clear().
  function clear($cid = NULL, $wildcard = FALSE) {
    // If there is a database cache, attempt to clear it whenever possible. The
    // reason for doing this is that the database cache can accumulate data
    // during installation due to any full bootstraps that may occur at the
    // same time (for example, Ajax requests triggered by the installer). If we
    // didn't try to clear it whenever this function is called, the data in the
    // cache would become stale; for example, the installer sometimes calls
    // variable_set(), which updates the {variable} table and then clears the
    // cache to make sure that the next page request picks up the new value.
    // Not actually clearing the cache here therefore leads old variables to be
    // loaded on the first page requests after installation, which can cause
    // subtle bugs, some of which would not be fixed unless the site
    // administrator cleared the cache manually.
    try {
      if (class_exists('Database')) {
        parent::clear($cid, $wildcard);
    // If the attempt at clearing the cache causes an error, that means that
    // either the database connection is not set up yet or the relevant cache
    // table in the database has not yet been created, so we can safely do
    // nothing here.
    catch (Exception $e) {

   * Overrides DrupalDatabaseCache::isEmpty().
  function isEmpty() {
    return TRUE;
2 string references to 'DrupalFakeCache'
install_begin_request in includes/
Begins an installation request, modifying the installation state as needed.
og-7.x-1.x.database.php in sites/all/modules/ulmus/og/tests/og-7.x-1.x.database.php
Filled installation of Drupal 7.0, for test purposes.



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.