function _cache_get_object

cis7 cache.inc _cache_get_object($bin)
cle7 cache.inc _cache_get_object($bin)
elmsmedia7 cache.inc _cache_get_object($bin)
icor7 cache.inc _cache_get_object($bin)
meedjum_blog7 cache.inc _cache_get_object($bin)
mooc7 cache.inc _cache_get_object($bin)

Gets the cache object for a cache bin.

By default, this returns an instance of the DrupalDatabaseCache class. Classes implementing DrupalCacheInterface can register themselves both as a default implementation and for specific bins.

Parameters

$bin: The cache bin for which the cache object should be returned.

Return value

DrupalCacheInterface The cache object associated with the specified bin.

See also

DrupalCacheInterface

5 calls to _cache_get_object()
cache_clear_all in includes/cache.inc
Expires data from the cache.
cache_get in includes/cache.inc
Returns data from the persistent cache.
cache_get_multiple in includes/cache.inc
Returns data from the persistent cache when given an array of cache IDs.
cache_is_empty in includes/cache.inc
Checks if a cache bin is empty.
cache_set in includes/cache.inc
Stores data in the persistent cache.

File

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

Code

function _cache_get_object($bin) {
  // We do not use drupal_static() here because we do not want to change the
  // storage of a cache bin mid-request.
  static $cache_objects;
  if (!isset($cache_objects[$bin])) {
    $class = variable_get('cache_class_' . $bin);
    if (!isset($class)) {
      $class = variable_get('cache_default_class', 'DrupalDatabaseCache');
    }
    $cache_objects[$bin] = new $class($bin);
  }
  return $cache_objects[$bin];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.