You are here

protected function PersistableCache::load in RESTful 7.2

Tries to load an item from the real cache.

Parameters

string $key: The key of the item.

1 call to PersistableCache::load()
PersistableCache::get in src/Util/PersistableCache.php
Gets the memory reference of the cached item.

File

src/Util/PersistableCache.php, line 114
Contains \Drupal\restful\Util\PersistableCache.

Class

PersistableCache

Namespace

Drupal\restful\Util

Code

protected function load($key) {
  if ($this
    ->isLoaded($key)) {
    return;
  }

  // Mark the key as loaded.
  $this->loaded[$key] = TRUE;
  if ($cache = cache_get($key, $this->cacheBin)) {
    $this->data[$key] = $cache->data;
  }
}