CacheStub.php in Drupal driver for SQL Server and SQL Azure 8.2
File
drivers/lib/Drupal/Driver/Database/sqlsrv/Component/CacheStub.php
View source
<?php
namespace Drupal\Driver\Database\sqlsrv\Component;
class CacheStub implements CacheInterface {
private $prefix = null;
private $data = [];
public function __construct($prefix) {
$this->prefix = $prefix;
}
public function Set($cid, $data) {
$cache = new \stdClass();
$cache->data = $data;
$cache->serialized = false;
$cache->timestamp = time();
$this->data[$cid] = clone $cache;
}
public function Get($cid) {
if (isset($this->data[$cid])) {
return $this->data[$cid];
}
return false;
}
public function Clear($cid) {
unset($this->data[$cid]);
}
}
Classes
Name |
Description |
CacheStub |
Stub implementation for the cache backend. |