Class TSqlMapCache
Direct Known Sub-classes:
Allow different implementation of caching strategy. See <tt>TSqlMapFifoCache</tt> for a first-in-first-out implementation. See <tt>TSqlMapLruCache</tt> for a least-recently-used cache implementation.
| Constructor Summary |
| public |
Create a new cache with limited cache size.
|
| Method Summary |
|
void
|
add
( mixed $id, mixed $value, mixed $expire, mixed $dependency)
|
|
object the
|
|
|
void
|
Clears the cache.
|
|
int
|
|
|
void
|
Maximum number of items to cache. Default size is 100.
|
| Constructor Details |
__construct
Create a new cache with limited cache size.
|
| Method Details |
add
| public void add |
(mixed $id , mixed $value , mixed $expire , mixed $dependency ) |
| Input |
| mixed | $id | |
| mixed | $value | |
| mixed | $expire | |
| mixed | $dependency | |
| Output |
| Exception |
| throws | TSqlMapException not implemented. |
|
delete
| public object the delete |
(mixed $key ) |
| Input |
| mixed | $key | |
| Output |
|
object the
| object removed if exists, null otherwise. |
| Exception |
|
flush
Clears the cache.
|
getCacheSize
| public int getCacheSize |
() |
| Output |
|
int
| cache size. |
| Exception |
|
setCacheSize
| public void setCacheSize |
(int $value ) |
Maximum number of items to cache. Default size is 100.
| Input |
| int | $value | cache size. |
| Output |
| Exception |
|
|