symfony API

sfFileCache Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu

1.4 API OpenSearch


You are currently browsing the symfony API for the 1.4 version. Switch to:

Cache class that stores content in files.


sfFileCache  <  sfCache

Method Summary

Methods inherited from sfCache

clean , get , getBackend , getLastModified , getLifetime , getMany , getOption , getTimeout , has , initialize , patternToRegexp , remove , removePattern , set , setOption , __construct

Method Details

  • clean () Browse code

    @see sfCache

  • get () Browse code

    @see sfCache

  • (string) getFilePath ($key) Browse code

    $key The cache key

    Converts a cache key to a full path.

    returns The full path to the cache file

  • getLastModified () Browse code

    @see sfCache

  • getTimeout () Browse code

    @see sfCache

  • has () Browse code

    @see sfCache

  • initialize () Browse code

    Initializes this sfCache instance.

    Available options:

    * cache_dir: The directory where to put cache files

    * see sfCache for options available for all drivers

  • isValid () Browse code

  • (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

  • remove () Browse code

    @see sfCache

  • removePattern () Browse code

    @see sfCache

  • set () Browse code

    @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