Property | Type | Description | |
---|---|---|---|
$driver | Stash\Interfaces\DriverInterface | The cacheDriver being used by the system. While this class handles all of the higher functions, it's the cache driver here that handles all of the storage/retrieval functionality. This value is set by the constructor. | |
$isDisabled | boolean | Is this Pool disabled. | |
$itemClass | string | Default "Item" class to use for making new items. | |
$logger | Psr\Log\LoggerInterface | If set various then errors and exceptions will get passed to the PSR Compliant logging library. This can be set using the setLogger() function in this class. | |
$namespace | string | Current namespace, if any. |
Method | Description | |
---|---|---|
__construct ( Stash\Interfaces\DriverInterface $driver = null ) | 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. | |
clear ( ) | ||
commit ( ) | ||
deleteItem ( $key ) | ||
deleteItems ( array $keys ) | ||
getDriver ( ) | ||
getItem ( $key ) | ||
getItems ( array $keys = [] ) | ||
getNamespace ( ) | ||
hasItem ( $key ) | ||
purge ( ) | ||
save ( Psr\Cache\CacheItemInterface $item ) | ||
saveDeferred ( Psr\Cache\CacheItemInterface $item ) | ||
setDriver ( Stash\Interfaces\DriverInterface $driver ) | ||
setItemClass ( $class ) | ||
setLogger ( $logger ) | ||
setNamespace ( $namespace = null ) |
Method | Description | |
---|---|---|
logException ( string $message, Exception $exception ) : boolean | Logs an exception with the Logger class, if it exists. |
public __construct ( Stash\Interfaces\DriverInterface $driver = null ) | ||
$driver | Stash\Interfaces\DriverInterface |
protected logException ( string $message, Exception $exception ) : boolean | ||
$message | string | |
$exception | Exception | |
return | boolean |
public save ( Psr\Cache\CacheItemInterface $item ) | ||
$item | Psr\Cache\CacheItemInterface |
public saveDeferred ( Psr\Cache\CacheItemInterface $item ) | ||
$item | Psr\Cache\CacheItemInterface |
public setDriver ( Stash\Interfaces\DriverInterface $driver ) | ||
$driver | Stash\Interfaces\DriverInterface |
protected DriverInterface,Stash\Interfaces $driver | ||
return | Stash\Interfaces\DriverInterface |
protected string $itemClass | ||
return | string |
protected Psr\Log\LoggerInterface $logger | ||
return | Psr\Log\LoggerInterface |
protected string $namespace | ||
return | string |