The constructor takes a Driver class which is used for persistent
storage. If no driver is provided then the Ephemeral driver is used by
default.
public __construct ( Stash\Interfaces\DriverInterface $driver = null ) | ||
$driver | Stash\Interfaces\DriverInterface |
/** * Constructs the cache holder. Parameter is a Stash driver which is dynamically injected at service creation. * * @param string $name Used to name and prefix the cache to avoid cache collisions across installs * @param \Stash\Interfaces\DriverInterface $driver * @param CacheTracker|null $tracker */ public function __construct($name, DriverInterface $driver = null, CacheTracker $tracker = null) { $this->tracker = $tracker; $this->setNamespace($name); if (isset($driver)) { $this->setDriver($driver); } parent::__construct($driver); }