symfony API

sfCache Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.0 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.

sfCache is an abstract class for all cache classes in symfony.

Inheritence

sfSQLiteCache, sfFileCache  <  sfCache

Method Summary

  • boolean clean()
    Cleans the cache.
  • string get(, , )
    Gets the cache content for a given id and namespace.
  • int getLifeTime()
    Returns the current life time.
  • boolean has(, , )
    Returns true if there is a cache for the given id and namespace.
  • int lastModified()
    Returns the cache last modification time.
  • boolean remove(, )
    Removes a content from the cache.
  • boolean set(, , )
    Saves some data in the cache.
  • setLifeTime()
    Sets a new life time.

Method Details

  • (boolean) clean ()

    Cleans the cache.


    If no namespace is specified all cache content will be destroyed
    else only cache contents of the specified namespace will be destroyed.

    returns true if no problem

  • (string) get (, , )

    Gets the cache content for a given id and namespace.

    returns The data of the cache (or null if no cache available)

  • (int) getLifeTime ()

    Returns the current life time.

    returns The current life time (in seconds)

  • (boolean) has (, , )

    Returns true if there is a cache for the given id and namespace.

    returns true if the cache exists, false otherwise

  • (int) lastModified ()

    Returns the cache last modification time.

    returns The last modification time

  • (boolean) remove (, )

    Removes a content from the cache.

    returns true if no problem

  • (boolean) set (, , )

    Saves some data in the cache.

    returns true if no problem

  • setLifeTime ()

    Sets a new life time.