Class TSqlMapApplicationCache
TSqlMapApplicationCache uses the default Prado application cache for caching
SqlMap results.
-
TSqlMapApplicationCache
implements
ICache
Methods summary
public
|
#
__construct( TSqlMapCacheModel $cacheModel = null )
Create a new cache with limited cache size.
Create a new cache with limited cache size.
Parameters
|
protected
string
|
#
getKeyListId( )
Returns
string a KeyListID for the cache model.
|
protected
TList
|
#
getKeyList( )
Retreive keylist from cache or create it if it doesn't exists
Retreive keylist from cache or create it if it doesn't exists
Returns
|
protected
|
#
setKeyList( mixed $keyList )
|
public
boolean
|
#
delete( string $key )
Parameters
- $key
string item to be deleted.
Returns
boolean if no error happens during deletion
Implementation of
|
public
|
#
flush( )
Deletes all items in the cache, only for data cached by sqlmap cachemodel
Deletes all items in the cache, only for data cached by sqlmap cachemodel
Implementation of
|
public
mixed
|
#
get( string $key )
Parameters
- $key
string a key identifying the cached value
Returns
mixed Gets a cached object with the specified key.
Implementation of
|
public
boolean
|
#
set( string $key, mixed $value, integer $expire = 0, ICacheDependency $dependency = null )
Stores a value identified by a key into cache.
Stores a value identified by a key into cache.
Parameters
- $key
string the key identifying the value to be cached
- $value
mixed the value to be cached
- $expire
integer the number of seconds in which the cached value will expire. 0 means never
expire.
- $dependency
ICacheDependency
dependency of the cached item. If the dependency changes, the item is labelled
invalid.
Returns
boolean true if the value is successfully stored into cache, false otherwise
Implementation of
|
protected
ICache
|
#
getCache( )
Returns
ICache
Application cache instance.
|
public
boolean
|
#
add( string $id, mixed $value, integer $expire = 0, ICacheDependency $dependency = null )
Parameters
- $id
string the key identifying the value to be cached
- $value
mixed the value to be cached
- $expire
integer the number of seconds in which the cached value will expire. 0 means never
expire.
- $dependency
ICacheDependency
dependency of the cached item. If the dependency changes, the item is labelled
invalid.
Returns
boolean true if the value is successfully stored into cache, false otherwise
Throws
Implementation of
|
Properties summary
protected
mixed
|
$_cacheModel |
null |
|