Cache class that stores content in files.
Method Summary
Methods inherited from sfCache
clean , get , getBackend , getLastModified , getLifetime , getMany , getOption , getTimeout , has , initialize , patternToRegexp , remove , removePattern , set , setOption , __construct
Method Details
-
@see sfCache
-
@see sfCache
-
(string) getFilePath ($key)
Browse code
Converts a cache key to a full path.
returns The full path to the cache file
-
@see sfCache
-
@see sfCache
-
@see sfCache
-
Initializes this sfCache instance.
Available options: * cache_dir: The directory where to put cache files * see sfCache for options available for all drivers
-
-
(array) read ($path, $type)
Browse code
| $path |
The file path |
| $type |
The type of data you want to be returned sfFileCache::READ_DATA: The cache content sfFileCache::READ_TIMEOUT: The timeout sfFileCache::READ_LAST_MODIFIED: The last modification timestamp |
Reads the cache file and returns the content.
returns the (meta)data of the cache file. E.g. $data[sfFileCache::READ_DATA]
throws sfCacheException
-
@see sfCache
-
@see sfCache
-
@see sfCache
-
setcache_dir ($cache_dir)
Browse code
| $cache_dir |
The directory where to put the cache files |
Sets the cache root directory.
-
(boolean) write ($path, $data, $timeout)
Browse code
| $path |
The file path |
| $data |
The data to put in cache |
| $timeout |
The timeout timestamp |
Writes the given data in the cache file.
returns true if ok, otherwise false
throws sfCacheException
|