You are here

public function FastCache::persist in Drupal driver for SQL Server and SQL Azure 8

Called on shutdown, persists the cache if necessary.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/FastCache.php, line 181
fastcache class.

Class

FastCache
Static caching layer.

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function persist() {
  foreach ($this->fastcacheitems as $cache) {
    if ($cache->persist == TRUE) {
      $this->cache
        ->set($cache->bin, $cache
        ->rawdata(), CacheBackendInterface::CACHE_PERMANENT);

      //if ($cache->locked) {

      //  lock_release('fastcache_' . $cache->bin);

      //}
    }
  }
}