Doctrine_Cache_Db __construct(
$options, array
$_options
)
|
|
constructor
Parameters:
array |
$_options: |
an array of options |
|
$options: |
|
API Tags:
Redefinition of:
- Doctrine_Cache_Driver::__construct()
- constructor
mixed contains(
string
$id
)
|
|
Test if a cache is available or not (for the given id)
Parameters:
API Tags:
Return: | false (a cache is not available) or "last modified" timestamp (int) of the available cache record |
Access: | public |
count returns the number of cached elements
API Tags:
Implementation of:
- Countable::count
Creates the cache table.
API Tags:
boolean delete(
string
$id
)
|
|
Remove a cache record
Parameters:
API Tags:
Return: | true if no problem |
Access: | public |
Removes all cache records
$return bool true on success, false on failure
API Tags:
string fetch(
string
$id, [boolean
$testCacheValidity = true]
)
|
|
Test if a cache is available for the given id and (if yes) return it (false else)
Note : return value is always "string" (unserialization is done by the core not by the backend)
Parameters:
string |
$id: |
cache id |
boolean |
$testCacheValidity: |
if set to false, the cache validity won't be tested |
API Tags:
Return: | cached datas (or false) |
Access: | public |
getConnection returns the connection object associated with this cache driver
API Tags:
Return: | connection object |
Access: | public |
boolean save(
string
$data, string
$id, [int
$lifeTime = false]
)
|
|
Save some string datas into a cache record
Note : $data is always saved as a string
Parameters:
string |
$data: |
data to cache |
string |
$id: |
cache id |
int |
$lifeTime: |
if != false, set a specific lifetime for this cache record (null => infinite lifeTime) |
API Tags:
Return: | true if no problem |
Access: | public |