PHP Class BxDolCacheFile, dolphin.pro

Inheritance: extends BxDolCache
ファイルを表示 Open project: boonex/dolphin.pro Class Usage Examples

Public Properties

Property Type Description
$sPath

Public Methods

Method Description
__construct ( ) constructor
_removeFileIfTtlExpired ( string $sFile, integer $iTTL ) : true remove file from dist if TTL expored
delData ( string $sKey ) : result Delete cache file.
getData ( string $sKey, integer $iTTL = false ) : the Get all data from the cache file.
getSizeByPrefix ( $s ) get size of cached data by name prefix
removeAllByPrefix ( $s ) : true remove all data from cache by key prefix
setData ( string $sKey, mixed $mixedData, integer $iTTL = false ) : boolean Save all data in cache file.

Method Details

__construct() public method

constructor
public __construct ( )

_removeFileIfTtlExpired() public method

remove file from dist if TTL expored
public _removeFileIfTtlExpired ( string $sFile, integer $iTTL ) : true
$sFile string - full path to filename
$iTTL integer - time to live in seconds
return true if TTL is expired and file is deleted or false otherwise

delData() public method

Delete cache file.
public delData ( string $sKey ) : result
$sKey string - file name
return result of the operation

getData() public method

Get all data from the cache file.
public getData ( string $sKey, integer $iTTL = false ) : the
$sKey string - file name
$iTTL integer - time to live
return the data is got from cache.

getSizeByPrefix() public method

get size of cached data by name prefix
public getSizeByPrefix ( $s )

removeAllByPrefix() public method

remove all data from cache by key prefix
public removeAllByPrefix ( $s ) : true
return true on success

setData() public method

Save all data in cache file.
public setData ( string $sKey, mixed $mixedData, integer $iTTL = false ) : boolean
$sKey string - file name
$mixedData mixed - the data to be cached in the file
$iTTL integer - time to live
return boolean result of operation.

Property Details

$sPath public_oe property

public $sPath