symfony API

sfFileCache Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

Cache class that stores content in files.

Inheritence

sfFileCache  <  sfCache

Method Summary

  • clean()
    @see sfCache
  • get()
    @see sfCache
  • string getFilePath($key)
    Converts a cache key to a full path.
  • getLastModified()
    @see sfCache
  • getTimeout()
    @see sfCache
  • has()
    @see sfCache
  • initialize()
    Initializes this sfCache instance.
  • string read($path, $type)
    Reads the cache file and returns the content.
  • remove()
    @see sfCache
  • removePattern()
    @see sfCache
  • set()
    @see sfCache
  • setcache_dir($cache_dir)
    Sets the cache root directory.
  • boolean write($path, $data, $timeout)
    Writes the given data in the cache file.

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

  • (string) 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 content of the cache file.

    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