PHP Class Prado\Data\SqlMap\Configuration\TSqlMapCacheModel

The results from a query Mapped Statement can be cached simply by specifying the {@link CacheModel TSqlMapStatement::setCacheModel()} property in tag. A cache model is a configured cache that is defined within the sql map configuration file. Cache models are configured using the element. The cache model uses a pluggable framework for supporting different types of caches. The choice of cache is specified by the {@link Implementation setImplementation()} property. The class name specified must be one of {@link TSqlMapCacheTypes}. The cache implementations, LRU and FIFO cache below do not persist across requests. That is, once the request is complete, all cache data is lost. These caches are useful queries that results in the same repeated data during the current request.
Since: 3.1
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
flush ( ) Clears the cache.
get ( $key ) : mixed
getFlushInterval ( ) : integer
getHitRatio ( ) : float
getID ( ) : string
getImplementation ( ) : string
getImplementationClass ( ) : string
initialize ( $cache = null ) Initialize the cache implementation, sets the actual cache contain if supplied.
registerCacheType ( $type, $className )
registerTriggerStatement ( $mappedStatement ) Register a mapped statement that will trigger a cache flush.
set ( $key, $value )
setFlushInterval ( $value )
setID ( $value )
setImplementation ( $value )

Method Details

flush() public méthode

Clears the cache.
public flush ( )

get() public méthode

public get ( $key ) : mixed
Résultat mixed cached value.

getFlushInterval() public méthode

public getFlushInterval ( ) : integer
Résultat integer cache duration.

getHitRatio() public méthode

public getHitRatio ( ) : float
Résultat float cache hit ratio.

getID() public méthode

public getID ( ) : string
Résultat string unique cache model identifier.

getImplementation() public méthode

public getImplementation ( ) : string
Résultat string cache implements of TSqlMapCacheTypes, either 'Basic', 'LRU' or 'FIFO'.

getImplementationClass() public méthode

public getImplementationClass ( ) : string
Résultat string cache implementation class name.

initialize() public méthode

Initialize the cache implementation, sets the actual cache contain if supplied.
public initialize ( $cache = null )

registerCacheType() public static méthode

public static registerCacheType ( $type, $className )

registerTriggerStatement() public méthode

Register a mapped statement that will trigger a cache flush.
public registerTriggerStatement ( $mappedStatement )

set() public méthode

public set ( $key, $value )

setFlushInterval() public méthode

public setFlushInterval ( $value )

setID() public méthode

public setID ( $value )

setImplementation() public méthode

public setImplementation ( $value )