PHP Класс 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.
С версии: 3.1
Наследование: extends Prado\TComponent
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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 )

Описание методов

flush() публичный Метод

Clears the cache.
public flush ( )

get() публичный Метод

public get ( $key ) : mixed
Результат mixed cached value.

getFlushInterval() публичный Метод

public getFlushInterval ( ) : integer
Результат integer cache duration.

getHitRatio() публичный Метод

public getHitRatio ( ) : float
Результат float cache hit ratio.

getID() публичный Метод

public getID ( ) : string
Результат string unique cache model identifier.

getImplementation() публичный Метод

public getImplementation ( ) : string
Результат string cache implements of TSqlMapCacheTypes, either 'Basic', 'LRU' or 'FIFO'.

getImplementationClass() публичный Метод

public getImplementationClass ( ) : string
Результат string cache implementation class name.

initialize() публичный Метод

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

registerCacheType() публичный статический Метод

public static registerCacheType ( $type, $className )

registerTriggerStatement() публичный Метод

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

set() публичный Метод

public set ( $key, $value )

setFlushInterval() публичный Метод

public setFlushInterval ( $value )

setID() публичный Метод

public setID ( $value )

setImplementation() публичный Метод

public setImplementation ( $value )