Get atkCache instance, default when no type is configured it will use var cache.
Parameters:
|
string |
$types: |
Cache type |
API Tags:
| Return: | object of the request type |
| Access: | public |
Private Constructor so we can only have
once instance of each cache
API Tags:
Redefined in descendants as:
boolean add(
string
$key, mixed
$data, [int
$lifetime = false]
)
|
|
Add cache entry if it not exists allready
Parameters:
|
string |
$key: |
Entry Id |
|
mixed |
$data: |
The data we want to add |
|
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. |
| Abstract: | |
| Access: | public |
Redefined in descendants as:
void delete(
string
$key
)
|
|
delete cache entry
Parameters:
API Tags:
Redefined in descendants as:
Deletes all cache entries
API Tags:
Redefined in descendants as:
get cache entry by key
Parameters:
API Tags:
| Return: | Boolean false on failure, cache data on success. |
| Abstract: | |
| Access: | public |
Redefined in descendants as:
mixed getCacheConfig(
string
$key, [mixed
$default = ""]
)
|
|
Get config values from the cache config
Parameters:
|
string |
$key: |
Key |
|
mixed |
$default: |
Default value |
API Tags:
string getClassname(
string
$type
)
|
|
Get Classname
Parameters:
API Tags:
| Return: | Classname of the cache type |
| Access: | private |
Get lifetime of the ache
API Tags:
| Return: | The cache lifetime |
| Access: | public |
Return current namespace that the cache is using
API Tags:
string getRealKey(
string
$key
)
|
|
Get realkey for the cache entry
Parameters:
API Tags:
| Return: | The real entry id |
| Access: | public |
Redefined in descendants as:
Get Current cache type
API Tags:
| Return: | Current cache |
| Access: | public |
Redefined in descendants as:
is cache active
API Tags:
boolean offsetExists(
string
$offset
)
|
|
Whether the offset exists
Parameters:
|
string |
$offset: |
Key to check |
Implementation of:
- ArrayAccess::offsetExists
mixed offsetGet(
string
$offset
)
|
|
Value at given offset
Parameters:
|
string |
$offset: |
Key to get |
Implementation of:
- ArrayAccess::offsetGet
boolean offsetSet(
string
$offset, mixed
$value
)
|
|
Set value for given offset
Parameters:
|
string |
$offset: |
Key to set |
|
mixed |
$value: |
Value for key |
Implementation of:
- ArrayAccess::offsetSet
void offsetUnset(
string
$offset
)
|
|
Unset value for given offset
Parameters:
|
string |
$offset: |
Key to unset |
Implementation of:
- ArrayAccess::offsetUnset
True set(
string
$key, mixed
$data, [int
$lifetime = false]
)
|
|
Set cache entry, if it not exists then add it to the cache
Parameters:
|
string |
$key: |
Entry ID |
|
mixed |
$data: |
The data we want to set |
|
int |
$lifetime: |
give a specific lifetime for this cache entry. When $lifetime is false the default lifetime is used. |
API Tags:
| Return: | on success, false on failure. |
| Abstract: | |
| Access: | public |
Redefined in descendants as:
void setActive(
boolean
$flag
)
|
|
Turn cache on/off
Parameters:
|
boolean |
$flag: |
Set cache active or not active |
API Tags:
void setLifetime(
int
$lifetime
)
|
|
Set the lifetime in seconds for the cache
Parameters:
|
int |
$lifetime: |
Set the lifetime in seconds |
API Tags:
void setNamespace(
string
$namespace
)
|
|
Set the namespace for the current cache
Parameters:
API Tags:
Redefined in descendants as: