|
Previous Page |
Solar_Cache_Adapter_Var |
Next Page |
add()
public
bool
add (
string $key,
mixed $data,
int $life default NULL
)
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)
$life: A custom lifespan, in seconds, for the entry; if null, uses the default lifespan for the adapter instance.
Returns
- (bool) True on success, false on failure.
Description
Inserts cache entry data, but only if the entry does not already exist.
Local
- Overview
- Config
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- _buildConfig()
- _exception()
- _fetchOrInsert()
- _isExpired()
- _postConfig()
- _postConstruct()
- _preConfig()
- add()
- delete()
- deleteAll()
- dump()
- entry()
- fetch()
- fetchOrAdd()
- fetchOrSave()
- getLife()
- increment()
- isActive()
- locale()
- save()
- setActive()