PHP code example of ngsoft / cache
1. Go to this page and download the library: Download ngsoft/cache library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ngsoft / cache example snippets
ApcuDriver::isSupported( ): bool
ApcuDriver::__construct( ): mixed
ApcuDriver::clear( ): bool
ApcuDriver::delete( string key ): bool
ApcuDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
ApcuDriver::has( string key ): bool
ApcuDriver::__debugInfo( ): array
ArrayDriver::__construct( int size = self::DEFAULT_SIZE ): mixed
ArrayDriver::clear( ): bool
ArrayDriver::purge( ): void
ArrayDriver::delete( string key ): bool
ArrayDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
ArrayDriver::has( string key ): bool
ArrayDriver::__debugInfo( ): array
Cache::invalidateTags( string[]|string tags ): bool
Cache::purge( ): void
Cache::get( string key, mixed|\Closure default = null ): mixed
Cache::increment( string key, int value = 1 ): int
Cache::decrement( string key, int value = 1 ): int
Cache::add( string key, mixed|\Closure value ): bool
Cache::clear( ): bool
Cache::commit( ): bool
Cache::deleteItem( string key ): bool
Cache::deleteItems( array keys ): bool
Cache::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
Cache::getItems( array keys = [] ): iterable
Cache::hasItem( string key ): bool
Cache::save( \Psr\Cache\CacheItemInterface item ): bool
Cache::saveDeferred( \Psr\Cache\CacheItemInterface item ): bool
Cache::lock( string name, int|float seconds, string owner = '' ): \NGSOFT\Lock\LockStore
Cache::setPrefix( string prefix ): void
Cache::getDriver( ): \NGSOFT\Cache\Interfaces\CacheDriver
Cache::invalidate( ): bool
CacheEntry::__construct( string key, int expiry, mixed value = null, array tags = [] ): mixed
CacheEntry::getCacheItem( string key ): \NGSOFT\Cache\CacheItem
CacheEntry::isHit( ): bool
CacheEntry::create( string key, int expiry, mixed value, array tags ): static
CacheEntry::createEmpty( string key ): static
CacheEntry::__serialize( ): array
CacheEntry::__unserialize( array data ): void
CacheEntry::__toString( ): string
CacheEvent::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key ): mixed
CacheEvent::getCachePool( ): \Psr\Cache\CacheItemPoolInterface
CacheHit::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key, mixed value ): mixed
CacheItem::validateKey( mixed key ): void
CacheItem::create( string key, ?array metadata = null ): static
CacheItem::__construct( string key, ?array metadata = null ): mixed
CacheItem::tag( string|iterable tags ): static
CacheItem::getMetadata( ): array
CacheItem::expiresAfter( int|\DateInterval|null time ): static
CacheItem::expiresAt( ?\DateTimeInterface expiration ): static
CacheItem::get( ): mixed
CacheItem::getKey( ): string
CacheItem::isHit( ): bool
CacheItem::set( mixed value ): static
CacheItem::__clone( ): void
CacheItem::__debugInfo( ): array
CachePool::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime, ?\Psr\Log\LoggerInterface logger = null, ?\Psr\EventDispatcher\EventDispatcherInterface eventDispatcher = null ): mixed
CachePool::__destruct( ): mixed
CachePool::__debugInfo( ): array
CachePool::setLogger( \Psr\Log\LoggerInterface logger ): void
CachePool::invalidateTags( string[]|string tags ): bool
CachePool::purge( ): void
CachePool::get( string key, mixed|\Closure default = null ): mixed
CachePool::increment( string key, int value = 1 ): int
CachePool::decrement( string key, int value = 1 ): int
CachePool::add( string key, mixed|\Closure value ): bool
CachePool::clear( ): bool
CachePool::commit( ): bool
CachePool::deleteItem( string key ): bool
CachePool::deleteItems( array keys ): bool
CachePool::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
CachePool::getItems( array keys = [] ): iterable
CachePool::hasItem( string key ): bool
CachePool::save( \Psr\Cache\CacheItemInterface item ): bool
CachePool::saveDeferred( \Psr\Cache\CacheItemInterface item ): bool
CachePool::lock( string name, int|float seconds, string owner = '' ): \NGSOFT\Lock\LockStore
ChainDriver::__construct( iterable drivers ): mixed
ChainDriver::setDefaultLifetime( int defaultLifetime ): void
ChainDriver::count( ): int
ChainDriver::getIterator( ): \Traversable
ChainDriver::getReverseIterator( ?int current = null ): \Traversable
ChainDriver::set( string key, mixed value, ?int ttl = null, string|array tags = [] ): bool
ChainDriver::purge( ): void
ChainDriver::clear( ): bool
ChainDriver::delete( string key ): bool
ChainDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
ChainDriver::has( string key ): bool
ChainDriver::__debugInfo( ): array
DoctrineCacheProvider::__construct( \NGSOFT\Cache\Interfaces\CacheDriver driver, string prefix = '', int defaultLifetime ): mixed
DoctrineCacheProvider::getNamespace( ): string
DoctrineCacheProvider::setNamespace( mixed namespace ): void
DoctrineCacheProvider::setLogger( \Psr\Log\LoggerInterface logger ): void
DoctrineCacheProvider::contains( mixed id ): bool
DoctrineCacheProvider::delete( mixed id ): bool
DoctrineCacheProvider::fetch( mixed id ): mixed
DoctrineCacheProvider::save( mixed id, mixed data, mixed lifeTime ): bool
DoctrineCacheProvider::deleteAll( ): bool
DoctrineCacheProvider::flushAll( ): bool
DoctrineCacheProvider::deleteMultiple( array keys ): bool
php
DoctrineCacheProvider::fetchMultiple( array keys ): array
php
DoctrineCacheProvider::saveMultiple( array keysAndValues, mixed lifetime ): bool
php
DoctrineCacheProvider::getStats( ): mixed
php
DoctrineDriver::__construct( \Doctrine\Common\Cache\CacheProvider provider ): mixed
php
DoctrineDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
DoctrineDriver::__debugInfo( ): array
php
FileCache::deleteItems( array keys ): bool
php
FileCache::getItem( string key ): \NGSOFT\Cache\Interfaces\TaggableCacheItem
php
FileCache::getItems( array keys = [] ): iterable
php
FileCache::getDriver( ): \NGSOFT\Cache\Interfaces\CacheDriver
php
FileDriver::__destruct( ): mixed
php
FileDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
FileDriver::__debugInfo( ): array
php
IlluminateDriver::__construct( \Illuminate\Contracts\Cache\Store provider ): mixed
php
IlluminateDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
IlluminateDriver::__debugInfo( ): array
php
JsonDriver::__construct( string|\NGSOFT\Filesystem\File file = '', string key = 'cache' ): mixed
php
JsonDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
JsonDriver::count( ): int
php
JsonDriver::__debugInfo( ): array
php
KeySaved::__construct( \Psr\Cache\CacheItemPoolInterface cachePool, string key, mixed value ): mixed
php
LaravelStore::get( mixed key ): mixed
php
LaravelStore::many( array keys ): array
php
LaravelStore::put( mixed key, mixed value, mixed seconds ): bool
php
LaravelStore::putMany( array values, mixed seconds ): bool
php
NullDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
PDOAdapter::__construct( \PDO driver, string table ): mixed
php
PHPCache::__construct( string rootpath = '', string prefix = '', int defaultLifetime, ?\Psr\Log\LoggerInterface logger = null, ?\Psr\EventDispatcher\EventDispatcherInterface eventDispatcher = null ): mixed
php
PHPCache::appendDriver( \NGSOFT\Cache\Interfaces\CacheDriver driver ): static
php
PHPCache::prependDriver( \NGSOFT\Cache\Interfaces\CacheDriver driver ): static
php
PhpDriver::__destruct( ): mixed
php
PhpDriver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
PhpDriver::__debugInfo( ): array
php
PSR16Driver::__construct( \Psr\SimpleCache\CacheInterface provider ): mixed
php
PSR16Driver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
PSR16Driver::__debugInfo( ): array
php
PSR6Driver::__construct( \Psr\Cache\CacheItemPoolInterface provider ): mixed
php
PSR6Driver::getCacheEntry( string key ): \NGSOFT\Cache\CacheEntry
php
PSR6Driver::__debugInfo( ): array