Class: atkCache_var
Source Location: /cache/class.atkcache_var.inc
Class atkCache_var
Class Overview
|
This file is part of the Achievo ATK distribution.
Detailed copyright and licensing information can be found in the doc/COPYRIGHT and doc/LICENSE files which should be included in the distribution. Cache class for variable (in-memory)
Located in /cache/class.atkcache_var.inc [line 22]
Wiki documentation
atkCache
|
--atkCache_var
Author(s):
Information Tags:
| Version: | $Revision: 6309 $ $Id: class.atkcache_var.inc 6354 2009-04-15 02:41:21Z mvdam $ |
| Copyright: | (c)2008 Sandy Pleyte |
| License: | ATK Open Source License |
|
Properties
|
Methods
|
Property Summary
| array |
$m_expires |
Expiration timestamps for each cache entry. |
Method Summary
| bool |
add() |
Inserts cache entry data, but only if the entry does not already exist. |
| boolean |
delete() |
Deletes a cache entry. |
| boolean |
deleteAll() |
Removes all cache entries. |
| mixed |
get() |
Gets cache entry data. |
| string |
getType() |
Get the current cache type |
| bool |
set() |
Sets cache entry data. |
Properties
Expiration timestamps for each cache entry.
API Tags:
Methods
atkCache_var __construct(
)
|
|
constructor
API Tags:
Redefinition of:
- atkCache::__construct()
- Private Constructor so we can only have
bool add(
string
$key, mixed
$data, [int
$lifetime = false]
)
|
|
Inserts cache entry data, but only if the entry does not already exist.
Parameters:
|
string |
$key: |
The entry ID. |
|
mixed |
$data: |
The data to write into the entry. |
|
int |
$lifetime: |
give a specific lifetime for this cache entry. When $lifetime is false the default lifetime is used. |
API Tags:
| Return: | True on success, false on failure. |
| Access: | public |
Redefinition of:
- atkCache::add()
- Add cache entry if it not exists allready
boolean delete(
string
$key
)
|
|
Deletes a cache entry.
Parameters:
|
string |
$key: |
The entry ID. |
API Tags:
| Return: | Succes |
| Access: | public |
Redefinition of:
- atkCache::delete()
- delete cache entry
Removes all cache entries.
API Tags:
| Return: | Succes |
| Access: | public |
Redefinition of:
- atkCache::deleteAll()
- Deletes all cache entries
Gets cache entry data.
Parameters:
|
string |
$key: |
The entry ID. |
API Tags:
| Return: | Boolean false on failure, cache data on success. |
| Access: | public |
Redefinition of:
- atkCache::get()
- get cache entry by key
Get the current cache type
API Tags:
| Return: | atkConfig type |
| Access: | public |
Redefinition of:
- atkCache::getType()
- Get Current cache type
bool set(
string
$key, mixed
$data, [int
$lifetime = false]
)
|
|
Sets cache entry data.
Parameters:
|
string |
$key: |
The entry ID. |
|
mixed |
$data: |
The data to write into the entry. |
|
int |
$lifetime: |
give a specific lifetime for this cache entry. When $lifetime is false the default lifetime is used. |
API Tags:
| Return: | True on success, false on failure. |
| Access: | public |
Redefinition of:
- atkCache::set()
- Set cache entry, if it not exists then add it to the cache