BearFramework\App\DataCacheDriver

A data cache driver. It uses the data repository provided to store the values.
BearFramework\App\DataCacheDriver implements BearFramework\App\ICacheDriver {

    
/* Methods */
    
public __construct BearFramework\App\DataRepository $dataRepository [, string $keyPrefix '.temp/cache/' ] )
    public 
void clear void )
    public 
void delete string $key )
    public 
void deleteMultiple ( array $keys )
    public 
mixed|null get string $key )
    public array 
getMultiple ( array $keys )
    public 
void set string $key type $value [, int $ttl ] )
    public 
void setMultiple ( array $items [, int $ttl ] )

}
Implements
A cache driver interface.
Methods
public __construct ( BearFramework\App\DataRepository $dataRepository [, string $keyPrefix = '.temp/cache/' ] )
Constructs a new data cache driver.
public void clear ( void )
Deletes all values from the cache.
public void delete ( string $key )
Deletes a value from the cache.
public void deleteMultiple ( array $keys )
Deletes multiple values from the cache.
public mixed|null get ( string $key )
Retrieves a value from the cache.
public array getMultiple ( array $keys )
Retrieves multiple values from the cache.
public void set ( string $key , type $value [, int $ttl ] )
Stores a value in the cache.
public void setMultiple ( array $items [, int $ttl ] )
Stores multiple values in the cache.
Details
Location: ~/src/App/DataCacheDriver.php
The information on this page is created for version 1.1 of Bear Framework and may not be applicable for other versions of the framework.