symfony API

sfProcessCache Class

« Back to API menu

action

addon

cache

config

controller

countable

database

debug

exception

filter

generator

helper

i18n

log

request

response

storage

test

user

util

validator

view

You are currently browsing the symfony documentation for the 1.0 version. Switch to:

sfProcessCache stores content in memory if you run a PHP accelerator.

Method Summary

  • string getPrefix()
    Gets the prefix to use for all key name.
  • mixed get($key)
    Gets a value in the cache for the specified key.
  • boolean set($key, $value, $lifeTime)
    Sets a value in the cache for the specified key.
  • string cacher()
    Gets the cache engine name or false if no PHP accelerator is enabled.
  • boolean clear()
    Clears the cache.
  • boolean has($key)
    Returns true if a given key exists in the cache, false otherwise.

Method Details

  • (string) getPrefix ()

    Gets the prefix to use for all key name.

    returns The prefix string

  • (mixed) get ($key)

    $key The key name

    Gets a value in the cache for the specified key.

    returns The content associated with the key or null if the key does not exist

  • (boolean) set ($key, $value, $lifeTime)

    $key The key name
    $value The content to put in cache
    $lifeTime The life time to keep the content in the cache in seconds

    Sets a value in the cache for the specified key.

    returns true if ok

  • (string) cacher ()

    Gets the cache engine name or false if no PHP accelerator is enabled.

    returns The cache engine name

  • (boolean) clear ()

    Clears the cache.

    returns true if ok, false otherwise

  • (boolean) has ($key)

    $key The key name

    Returns true if a given key exists in the cache, false otherwise.

    returns true if the key exists, false otherwise