Doctrine\Common\Cache\Cache
/Doctrine/Common/Cache/Cache.php at line 36
Interface Cache
Cache
public interface Cache
- License:
- http://www.opensource.org/licenses/lgpl-license.php LGPL
- See Also:
www.doctrine-project.org
- Since:
- 2.0
- Version:
- $Revision: 3938 $
- Author:
- Benjamin Eberlei
- Guilherme Blanco
- Jonathan Wage
- Roman Borschel
Method Summary |
boolean |
contains(string id) Test if an entry exists in the cache. |
boolean |
delete(string id) Deletes a cache entry. |
string |
fetch(string id) Fetches an entry from the cache. |
boolean |
save(string id, string data, int lifeTime) Puts data into the cache. |
Method Detail
/Doctrine/Common/Cache/Cache.php at line 52
contains
public boolean contains(string id)
Test if an entry exists in the cache.
- Parameters:
- id - cache id The cache id of the entry to check for.
- Returns:
- TRUE if a cache entry exists for the given cache id, FALSE otherwise.
/Doctrine/Common/Cache/Cache.php at line 70
delete
public boolean delete(string id)
Deletes a cache entry.
- Parameters:
- id - cache id
- Returns:
- TRUE if the cache entry was successfully deleted, FALSE otherwise.
/Doctrine/Common/Cache/Cache.php at line 44
fetch
public string fetch(string id)
Fetches an entry from the cache.
- Parameters:
- id - cache id The id of the cache entry to fetch.
- Returns:
- The cached data or FALSE, if no cache entry exists for the given id.
/Doctrine/Common/Cache/Cache.php at line 62
save
public boolean save(string id, string data, int lifeTime)
Puts data into the cache.
- Parameters:
- id - The cache id.
- data - The cache entry/data.
- lifeTime - The lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
- Returns:
- TRUE if the entry was successfully stored in the cache, FALSE otherwise.
Interface for cache drivers.