You are here

public function PersistableCache::persist in RESTful 7.2

Persist the cache to the RESTful cache.

Overrides PersistableCacheInterface::persist

1 call to PersistableCache::persist()
PersistableCache::__destruct in src/Util/PersistableCache.php
Persist the data in the cache backend during shutdown.

File

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

Class

PersistableCache

Namespace

Drupal\restful\Util

Code

public function persist() {
  foreach ($this->data as $key => $value) {
    cache_set($key, $value, $this->cacheBin);
  }
}