- Full name: \NGSOFT\Cache\Drivers\ApcuDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
ApcuDriver::isSupported( ): bool
- This method is static.
Return Value:
ApcuDriver::__construct( ): mixed
Return Value:
ApcuDriver::clear( ): bool
Return Value:
ApcuDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ApcuDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ApcuDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ApcuDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Drivers\ArrayDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
ArrayDriver::__construct( int size = self::DEFAULT_SIZE ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
size |
int |
Return Value:
{@inheritdoc}
ArrayDriver::clear( ): bool
Return Value:
Removes expired item entries if supported
ArrayDriver::purge( ): void
Return Value:
{@inheritdoc}
ArrayDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
ArrayDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
ArrayDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ArrayDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Facades\Cache
- Parent class:
Invalidates cached items using tags.
Cache::invalidateTags( string[]|string tags ): bool
When implemented on a PSR-6 pool, invalidation should not apply to deferred items. Instead, they should be committed as usual. This allows replacing old tagged values by new ones without race conditions.
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
tags |
string[]|string | An array of tags to invalidate |
Return Value:
True on success
Removes expired item entries if supported
Cache::purge( ): void
- This method is static.
Return Value:
Fetches a value from the pool or computes it if not found.
Cache::get( string key, mixed|\Closure default = null ): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
default |
mixed|\Closure | if set the item will be saved with that value |
Return Value:
Increment the value of an item in the cache.
Cache::increment( string key, int value = 1 ): int
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Decrement the value of an item in the cache.
Cache::decrement( string key, int value = 1 ): int
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Adds data if it doesn't already exists
Cache::add( string key, mixed|\Closure value ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed|\Closure |
Return Value:
True if the data have been added, false otherwise
{@inheritdoc}
Cache::clear( ): bool
- This method is static.
Return Value:
{@inheritdoc}
Cache::commit( ): bool
- This method is static.
Return Value:
{@inheritdoc}
Cache::deleteItem( string key ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
Cache::deleteItems( array keys ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
Cache::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
Cache::getItems( array keys = [] ): iterable
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
Cache::hasItem( string key ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
Cache::save( \Psr\Cache\CacheItemInterface item ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
Cache::saveDeferred( \Psr\Cache\CacheItemInterface item ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
Cache::lock( string name, int|float seconds, string owner = '' ): \NGSOFT\Lock\LockStore
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
name |
string | |
seconds |
int|float | |
owner |
string |
Return Value:
Change cache prefix
Cache::setPrefix( string prefix ): void
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
prefix |
string |
Return Value:
Access Cache driver directly
Cache::getDriver( ): \NGSOFT\Cache\Interfaces\CacheDriver
- This method is static.
Return Value:
Increase prefix version, invalidating all prefixed entries
Cache::invalidate( ): bool
- This method is static.
Return Value:
- Full name: \NGSOFT\Cache\CacheEntry
- This class implements: \Stringable
CacheEntry::__construct( string key, int expiry, mixed value = null, array tags = [] ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
expiry |
int | |
value |
mixed | |
tags |
array |
Return Value:
CacheEntry::getCacheItem( string key ): \NGSOFT\Cache\CacheItem
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
CacheEntry::isHit( ): bool
Return Value:
CacheEntry::create( string key, int expiry, mixed value, array tags ): static
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
expiry |
int | |
value |
mixed | |
tags |
array |
Return Value:
CacheEntry::createEmpty( string key ): static
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
CacheEntry::__serialize( ): array
Return Value:
CacheEntry::__unserialize( array data ): void
Parameters:
Parameter | Type | Description |
---|---|---|
data |
array |
Return Value:
CacheEntry::__toString( ): string
Return Value:
- Full name: \NGSOFT\Cache\Exceptions\CacheError
- Parent class:
- This class implements: \Psr\Cache\CacheException, \Psr\SimpleCache\CacheException
- Full name: \NGSOFT\Cache\Events\CacheEvent
- This class implements: \Psr\EventDispatcher\StoppableEventInterface
CacheEvent::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
cachePool |
\Psr\Cache\CacheItemPoolInterface | |
key |
string |
Return Value:
CacheEvent::getCachePool( ): \Psr\Cache\CacheItemPoolInterface
Return Value:
- Full name: \NGSOFT\Cache\Events\CacheHit
- Parent class: \NGSOFT\Cache\Events\CacheEvent
CacheHit::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key, mixed value ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
cachePool |
\Psr\Cache\CacheItemPoolInterface | |
key |
string | |
value |
mixed |
Return Value:
A Cache Item
- Full name: \NGSOFT\Cache\CacheItem
- This class implements: \NGSOFT\Cache\Interfaces\TaggableCacheItem, \NGSOFT\Cache, \Stringable
CacheItem::validateKey( mixed key ): void
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed |
Return Value:
CacheItem::create( string key, ?array metadata = null ): static
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
metadata |
?array |
Return Value:
CacheItem::__construct( string key, ?array metadata = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
metadata |
?array |
Return Value:
Adds a tag to a cache item.
CacheItem::tag( string|iterable tags ): static
Parameters:
Parameter | Type | Description |
---|---|---|
tags |
string|iterable | A tag or array of tags |
Return Value:
Returns a list of metadata info that were saved alongside with the cached value.
CacheItem::getMetadata( ): array
Return Value:
{@inheritdoc}
CacheItem::expiresAfter( int|\DateInterval|null time ): static
Parameters:
Parameter | Type | Description |
---|---|---|
time |
int|\DateInterval|null |
Return Value:
{@inheritdoc}
CacheItem::expiresAt( ?\DateTimeInterface expiration ): static
Parameters:
Parameter | Type | Description |
---|---|---|
expiration |
?\DateTimeInterface |
Return Value:
{@inheritdoc}
CacheItem::get( ): mixed
Return Value:
{@inheritdoc}
CacheItem::getKey( ): string
Return Value:
{@inheritdoc}
CacheItem::isHit( ): bool
Return Value:
{@inheritdoc}
CacheItem::set( mixed value ): static
Parameters:
Parameter | Type | Description |
---|---|---|
value |
mixed |
Return Value:
{@inheritdoc}
CacheItem::__clone( ): void
Return Value:
CacheItem::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Events\CacheMiss
- Parent class: \NGSOFT\Cache\Events\CacheEvent
A PSR-6 cache pool
- Full name: \NGSOFT\Cache\CachePool
- This class implements: \Stringable, \Psr\Log\LoggerAwareInterface, \Psr\Cache\CacheItemPoolInterface, \NGSOFT\Cache, \NGSOFT\Lock\LockProvider
CachePool::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime, ?\Psr\Log\LoggerInterface logger = null, ?\Psr\EventDispatcher\EventDispatcherInterface eventDispatcher = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver | |
prefix |
string | |
defaultLifetime |
int | |
logger |
?\Psr\Log\LoggerInterface | |
eventDispatcher |
?\Psr\EventDispatcher\EventDispatcherInterface |
Return Value:
CachePool::__destruct( ): mixed
Return Value:
CachePool::__debugInfo( ): array
Return Value:
CachePool::setLogger( \Psr\Log\LoggerInterface logger ): void
Parameters:
Parameter | Type | Description |
---|---|---|
logger |
\Psr\Log\LoggerInterface |
Return Value:
Invalidates cached items using tags.
CachePool::invalidateTags( string[]|string tags ): bool
When implemented on a PSR-6 pool, invalidation should not apply to deferred items. Instead, they should be committed as usual. This allows replacing old tagged values by new ones without race conditions.
Parameters:
Parameter | Type | Description |
---|---|---|
tags |
string[]|string | An array of tags to invalidate |
Return Value:
True on success
Removes expired item entries if supported
CachePool::purge( ): void
Return Value:
Fetches a value from the pool or computes it if not found.
CachePool::get( string key, mixed|\Closure default = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
default |
mixed|\Closure | if set the item will be saved with that value |
Return Value:
Increment the value of an item in the cache.
CachePool::increment( string key, int value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Decrement the value of an item in the cache.
CachePool::decrement( string key, int value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Adds data if it doesn't already exists
CachePool::add( string key, mixed|\Closure value ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed|\Closure |
Return Value:
True if the data have been added, false otherwise
{@inheritdoc}
CachePool::clear( ): bool
Return Value:
{@inheritdoc}
CachePool::commit( ): bool
Return Value:
{@inheritdoc}
CachePool::deleteItem( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
CachePool::deleteItems( array keys ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
CachePool::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
CachePool::getItems( array keys = [] ): iterable
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
CachePool::hasItem( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
CachePool::save( \Psr\Cache\CacheItemInterface item ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
CachePool::saveDeferred( \Psr\Cache\CacheItemInterface item ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
CachePool::lock( string name, int|float seconds, string owner = '' ): \NGSOFT\Lock\LockStore
Parameters:
Parameter | Type | Description |
---|---|---|
name |
string | |
seconds |
int|float | |
owner |
string |
Return Value:
- Full name: \NGSOFT\Cache\Drivers\ChainDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
- This class implements: \Countable
ChainDriver::__construct( iterable drivers ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
drivers |
iterable |
Return Value:
set the default ttl
ChainDriver::setDefaultLifetime( int defaultLifetime ): void
Parameters:
Parameter | Type | Description |
---|---|---|
defaultLifetime |
int |
Return Value:
ChainDriver::count( ): int
Return Value:
ChainDriver::getIterator( ): \Traversable
Return Value:
ChainDriver::getReverseIterator( ?int current = null ): \Traversable
Parameters:
Parameter | Type | Description |
---|---|---|
current |
?int |
Return Value:
Persists data in the cache
ChainDriver::set( string key, mixed value, ?int ttl = null, string|array tags = [] ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed | |
ttl |
?int | a value of 0 never expires, a null value uses the default value set in the driver |
tags |
string|array |
Return Value:
Removes expired item entries if supported
ChainDriver::purge( ): void
Return Value:
ChainDriver::clear( ): bool
Return Value:
ChainDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ChainDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ChainDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
ChainDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Adapters\DoctrineCacheProvider
- Parent class:
- This class implements: \NGSOFT\Cache, \Psr\Log\LoggerAwareInterface, \Stringable
DoctrineCacheProvider::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver | |
prefix |
string | |
defaultLifetime |
int |
Return Value:
DoctrineCacheProvider::getNamespace( ): string
Return Value:
DoctrineCacheProvider::setNamespace( mixed namespace ): void
Parameters:
Parameter | Type | Description |
---|---|---|
namespace |
mixed |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::setLogger( \Psr\Log\LoggerInterface logger ): void
Parameters:
Parameter | Type | Description |
---|---|---|
logger |
\Psr\Log\LoggerInterface |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::contains( mixed id ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::delete( mixed id ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::fetch( mixed id ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::save( mixed id, mixed data, mixed lifeTime ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed | |
data |
mixed | |
lifeTime |
mixed |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::deleteAll( ): bool
Return Value:
{@inheritdoc}
DoctrineCacheProvider::flushAll( ): bool
Return Value:
{@inheritdoc}
DoctrineCacheProvider::deleteMultiple( array keys ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::fetchMultiple( array keys ): array
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
DoctrineCacheProvider::saveMultiple( array keysAndValues, mixed lifetime ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
keysAndValues |
array | |
lifetime |
mixed |
Return Value:
DoctrineCacheProvider::getStats( ): mixed
Return Value:
- Full name: \NGSOFT\Cache\Drivers\DoctrineDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
DoctrineDriver::__construct( \Doctrine\Common\Cache\CacheProvider provider ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
provider |
\Doctrine\Common\Cache\CacheProvider |
Return Value:
DoctrineDriver::clear( ): bool
Return Value:
DoctrineDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
DoctrineDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
DoctrineDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
DoctrineDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Facades\FileCache
- Parent class:
Invalidates cached items using tags.
FileCache::invalidateTags( string[]|string tags ): bool
When implemented on a PSR-6 pool, invalidation should not apply to deferred items. Instead, they should be committed as usual. This allows replacing old tagged values by new ones without race conditions.
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
tags |
string[]|string | An array of tags to invalidate |
Return Value:
True on success
Removes expired item entries if supported
FileCache::purge( ): void
- This method is static.
Return Value:
Fetches a value from the pool or computes it if not found.
FileCache::get( string key, mixed|\Closure default = null ): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
default |
mixed|\Closure | if set the item will be saved with that value |
Return Value:
Increment the value of an item in the cache.
FileCache::increment( string key, int value = 1 ): int
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Decrement the value of an item in the cache.
FileCache::decrement( string key, int value = 1 ): int
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Adds data if it doesn't already exists
FileCache::add( string key, mixed|\Closure value ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed|\Closure |
Return Value:
True if the data have been added, false otherwise
{@inheritdoc}
FileCache::clear( ): bool
- This method is static.
Return Value:
{@inheritdoc}
FileCache::commit( ): bool
- This method is static.
Return Value:
{@inheritdoc}
FileCache::deleteItem( string key ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
FileCache::deleteItems( array keys ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
FileCache::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
FileCache::getItems( array keys = [] ): iterable
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
FileCache::hasItem( string key ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
FileCache::save( \Psr\Cache\CacheItemInterface item ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
FileCache::saveDeferred( \Psr\Cache\CacheItemInterface item ): bool
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
item |
\Psr\Cache\CacheItemInterface |
Return Value:
{@inheritdoc}
FileCache::lock( string name, int|float seconds, string owner = '' ): \NGSOFT\Lock\LockStore
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
name |
string | |
seconds |
int|float | |
owner |
string |
Return Value:
Change cache prefix
FileCache::setPrefix( string prefix ): void
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
prefix |
string |
Return Value:
Access Cache driver directly
FileCache::getDriver( ): \NGSOFT\Cache\Interfaces\CacheDriver
- This method is static.
Return Value:
Increase prefix version, invalidating all prefixed entries
FileCache::invalidate( ): bool
- This method is static.
Return Value:
The oldest cache driver that store binary datas
- Full name: \NGSOFT\Cache\Drivers\FileDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
FileDriver::onWindows( ): bool
- This method is static.
Return Value:
FileDriver::__construct( string root = '', string prefix = '' ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
root |
string | |
prefix |
string |
Return Value:
FileDriver::__destruct( ): mixed
Return Value:
Removes expired item entries if supported
FileDriver::purge( ): void
Return Value:
FileDriver::clear( ): bool
Return Value:
FileDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
FileDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
FileDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
FileDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Drivers\IlluminateDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
IlluminateDriver::__construct( \Illuminate\Contracts\Cache\Store provider ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
provider |
\Illuminate\Contracts\Cache\Store |
Return Value:
IlluminateDriver::clear( ): bool
Return Value:
IlluminateDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
IlluminateDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
IlluminateDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
IlluminateDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Exceptions\InvalidArgument
- Parent class: \NGSOFT\Cache\Exceptions\CacheError
- This class implements: \Psr\Cache\InvalidArgumentException, \Psr\SimpleCache\InvalidArgumentException
A driver that can be used for Cli applications Can store data inside a json config file for example
- Full name: \NGSOFT\Cache\Drivers\JsonDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
- This class implements: \Countable
JsonDriver::__construct( string|\NGSOFT\Filesystem\File file = '', string key = 'cache' ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
file |
string|\NGSOFT\Filesystem\File | |
key |
string | Key to use inside the object |
Return Value:
Removes expired item entries if supported
JsonDriver::purge( ): void
Return Value:
JsonDriver::clear( ): bool
Return Value:
JsonDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
JsonDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
JsonDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
JsonDriver::count( ): int
Return Value:
JsonDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Events\KeyDeleted
- Parent class: \NGSOFT\Cache\Events\CacheEvent
- Full name: \NGSOFT\Cache\Events\KeySaved
- Parent class: \NGSOFT\Cache\Events\CacheEvent
KeySaved::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key, mixed value ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
cachePool |
\Psr\Cache\CacheItemPoolInterface | |
key |
string | |
value |
mixed |
Return Value:
- Full name: \NGSOFT\Cache\Adapters\LaravelStore
- This class implements: \NGSOFT\Cache, \Illuminate\Contracts\Cache\Store, \Psr\Log\LoggerAwareInterface, \Stringable, \Illuminate\Contracts\Cache\LockProvider
LaravelStore::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver | |
prefix |
string | |
defaultLifetime |
int |
Return Value:
{@inheritdoc}
LaravelStore::setLogger( \Psr\Log\LoggerInterface logger ): void
Parameters:
Parameter | Type | Description |
---|---|---|
logger |
\Psr\Log\LoggerInterface |
Return Value:
{@inheritdoc}
LaravelStore::increment( mixed key, mixed value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
value |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::decrement( mixed key, mixed value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
value |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::flush( ): bool
Return Value:
{@inheritdoc}
LaravelStore::forever( mixed key, mixed value ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
value |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::forget( mixed key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::get( mixed key ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::getPrefix( ): string
Return Value:
{@inheritdoc}
LaravelStore::many( array keys ): array
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
LaravelStore::put( mixed key, mixed value, mixed seconds ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
value |
mixed | |
seconds |
mixed |
Return Value:
{@inheritdoc}
LaravelStore::putMany( array values, mixed seconds ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
values |
array | |
seconds |
mixed |
Return Value:
- Full name: \NGSOFT\Cache\Drivers\NullDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
NullDriver::clear( ): bool
Return Value:
NullDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
NullDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
NullDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
- Full name: \NGSOFT\Cache\Databases\SQLite\PDOAdapter
- Parent class: \NGSOFT\Cache\Databases\SQLite\QueryEngine
PDOAdapter::__construct( \PDO driver, string table ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\PDO | |
table |
string |
Return Value:
PDOAdapter::read( string key, bool data = true ): array|false
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
data |
bool |
Return Value:
PDOAdapter::query( string query ): array|bool
Parameters:
Parameter | Type | Description |
---|---|---|
query |
string |
Return Value:
A preconfigured cache pool Chains ArrayDriver, ApcuDriver, PhpDriver
- Full name: \NGSOFT\Cache\PHPCache
- Parent class: \NGSOFT\Cache\CachePool
PHPCache::__construct( string rootpath = '', string prefix = '', int defaultLifetime, ?\Psr\Log\LoggerInterface logger = null, ?\Psr\EventDispatcher\EventDispatcherInterface eventDispatcher = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
rootpath |
string | |
prefix |
string | |
defaultLifetime |
int | |
logger |
?\Psr\Log\LoggerInterface | |
eventDispatcher |
?\Psr\EventDispatcher\EventDispatcherInterface |
Return Value:
Put a driver at the end of the chain
PHPCache::appendDriver( \NGSOFT\Cache\Interfaces\CacheDriver driver ): static
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver |
Return Value:
Put a driver at the beginning of the chain
PHPCache::prependDriver( \NGSOFT\Cache\Interfaces\CacheDriver driver ): static
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver |
Return Value:
- Full name: \NGSOFT\Cache\Drivers\PhpDriver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
PhpDriver::opCacheSupported( ): bool
- This method is static.
Return Value:
PhpDriver::onWindows( ): bool
- This method is static.
Return Value:
PhpDriver::__construct( string root = '', string prefix = '' ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
root |
string | |
prefix |
string |
Return Value:
PhpDriver::__destruct( ): mixed
Return Value:
Removes expired item entries if supported
PhpDriver::purge( ): void
Return Value:
PhpDriver::clear( ): bool
Return Value:
PhpDriver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PhpDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PhpDriver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PhpDriver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Drivers\PSR16Driver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
PSR16Driver::__construct( \Psr\SimpleCache\CacheInterface provider ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
provider |
\Psr\SimpleCache\CacheInterface |
Return Value:
PSR16Driver::clear( ): bool
Return Value:
PSR16Driver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR16Driver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR16Driver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR16Driver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Drivers\PSR6Driver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
PSR6Driver::__construct( \Psr\Cache\CacheItemPoolInterface provider ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
provider |
\Psr\Cache\CacheItemPoolInterface |
Return Value:
PSR6Driver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR6Driver::clear( ): bool
Return Value:
PSR6Driver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR6Driver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
PSR6Driver::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Adapters\ReactCache
- This class implements: \NGSOFT\Cache, \React\Cache\CacheInterface, \Stringable, \Psr\Log\LoggerAwareInterface
ReactCache::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\NGSOFT\Cache\Interfaces\CacheDriver | |
prefix |
string | |
defaultLifetime |
int |
Return Value:
{@inheritdoc}
ReactCache::setLogger( \Psr\Log\LoggerInterface logger ): void
Parameters:
Parameter | Type | Description |
---|---|---|
logger |
\Psr\Log\LoggerInterface |
Return Value:
Increment the value of an item in the cache.
ReactCache::increment( string key, int value = 1 ): \React\Promise\PromiseInterface<int>
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
new value
Decrement the value of an item in the cache.
ReactCache::decrement( string key, int value = 1 ): \React\Promise\PromiseInterface<int>
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
new value
Adds data if it doesn't already exists
ReactCache::add( string key, mixed|\Closure value ): \React\Promise\PromiseInterface<bool>
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed|\Closure |
Return Value:
True if the data have been added, false otherwise
{@inheritdoc}
ReactCache::clear( ): \React\Promise\PromiseInterface
Return Value:
{@inheritdoc}
ReactCache::delete( mixed key ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed |
Return Value:
{@inheritdoc}
ReactCache::has( mixed key ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed |
Return Value:
{@inheritdoc}
ReactCache::get( mixed key, mixed default = null ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
default |
mixed |
Return Value:
{@inheritdoc}
ReactCache::set( mixed key, mixed value, mixed ttl = null ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
key |
mixed | |
value |
mixed | |
ttl |
mixed |
Return Value:
{@inheritdoc}
ReactCache::deleteMultiple( array keys ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array |
Return Value:
{@inheritdoc}
ReactCache::getMultiple( array keys, mixed default = null ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
array | |
default |
mixed |
Return Value:
{@inheritdoc}
ReactCache::setMultiple( array values, mixed ttl = null ): \React\Promise\PromiseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
values |
array | |
ttl |
mixed |
Return Value:
PSR-6 to PSR-16 Adapter
- Full name: \NGSOFT\Cache\Adapters\SimpleCachePool
- This class implements: \Psr\SimpleCache\CacheInterface, \Psr\Log\LoggerAwareInterface, \Stringable, \NGSOFT\Cache
SimpleCachePool::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, ?int defaultLifetime = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
cachePool |
\Psr\Cache\CacheItemPoolInterface | |
defaultLifetime |
?int |
Return Value:
{@inheritdoc}
SimpleCachePool::getCachePool( ): \Psr\Cache\CacheItemPoolInterface
Return Value:
Increment the value of an item in the cache.
SimpleCachePool::increment( string key, int value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Decrement the value of an item in the cache.
SimpleCachePool::decrement( string key, int value = 1 ): int
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
int |
Return Value:
Adds data if it doesn't already exists
SimpleCachePool::add( string key, mixed|\Closure value ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed|\Closure |
Return Value:
True if the data have been added, false otherwise
{@inheritdoc}
SimpleCachePool::clear( ): bool
Return Value:
{@inheritdoc}
SimpleCachePool::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
SimpleCachePool::deleteMultiple( iterable keys ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
iterable |
Return Value:
{@inheritdoc}
SimpleCachePool::get( string key, mixed default = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
default |
mixed |
Return Value:
{@inheritdoc}
SimpleCachePool::getMultiple( iterable keys, mixed default = null ): iterable
Parameters:
Parameter | Type | Description |
---|---|---|
keys |
iterable | |
default |
mixed |
Return Value:
{@inheritdoc}
SimpleCachePool::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
{@inheritdoc}
SimpleCachePool::set( string key, mixed value, null|int|\DateInterval ttl = null ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
value |
mixed | |
ttl |
null|int|\DateInterval |
Return Value:
{@inheritdoc}
SimpleCachePool::setMultiple( iterable values, null|int|\DateInterval ttl = null ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
values |
iterable | |
ttl |
null|int|\DateInterval |
Return Value:
SimpleCachePool::__debugInfo( ): array
Return Value:
- Full name: \NGSOFT\Cache\Databases\SQLite\SQLite3Adapter
- Parent class: \NGSOFT\Cache\Databases\SQLite\QueryEngine
SQLite3Adapter::__construct( \SQLite3 driver, string table ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\SQLite3 | |
table |
string |
Return Value:
SQLite3Adapter::read( string key, bool data = true ): array|false
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string | |
data |
bool |
Return Value:
SQLite3Adapter::query( string query ): array|bool
Parameters:
Parameter | Type | Description |
---|---|---|
query |
string |
Return Value:
- Full name: \NGSOFT\Cache\Drivers\Sqlite3Driver
- Parent class: \NGSOFT\Cache\Drivers\BaseDriver
Sqlite3Driver::__construct( \SQLite3|\PDO|string driver = '', string table = 'cache' ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
driver |
\SQLite3|\PDO|string | A SQLite3 instance or a filename |
table |
string |
Return Value:
Removes expired item entries if supported
Sqlite3Driver::purge( ): void
Return Value:
Sqlite3Driver::clear( ): bool
Return Value:
Sqlite3Driver::delete( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
Sqlite3Driver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
Sqlite3Driver::has( string key ): bool
Parameters:
Parameter | Type | Description |
---|---|---|
key |
string |
Return Value:
Sqlite3Driver::__debugInfo( ): array
Return Value: