You are currently viewing the 1.0 branch api documentation. Switch to 1.1

1.0 Doctrine_Cache

Doctrine Cache

Inheritence

Doctrine_Cache  < Doctrine_EventListener

Method Summary

Returns Name Description
add
appendStats
clean
integer count
array getAll
getDriver
ArrayIterator getIterator
mixed getOption
boolean isSuccessful
string pop
boolean preExecute adds the issued query to internal query stack and checks if cached element exists
array preFetch advances the internal pointer of cached data and returns the current element
array preFetchAll returns the current cache data array
boolean preQuery adds the issued query to internal query stack and checks if cached element exists
array readStats
reset
boolean setOption
__construct

Method Details

  • $query sql query string
    $namespace connection namespace

    add((string|array) $query, $namespace = null)

    Adds a query to internal query stack


  • appendStats()

    Append all queries to stats file


  • clean()

    Delete all cache


  • (integer) count()

    Count the number of queries on the stack

    Doctrine_Cache


  • $namespace optional query namespace

    (array) getAll($namespace = null)

    Get array of all executed queries

    Doctrine_Cache


  • getDriver()

    Get the current cache driver instance


  • (ArrayIterator) getIterator()

    Get queries iterator

    Doctrine_Cache


  • $option the option name

    (mixed) getOption($option)

    Get value of option name

    Doctrine_Cache


  • (boolean) isSuccessful()

    Check whether or not the last cache opration was successful or not

    Doctrine_Cache


  • (string) pop()

    Pops a query from the stack


  • (boolean) preExecute(( ) $event)

    Listens the preExecute event of Doctrine_Connection_Statement

    adds the issued query to internal query stack and checks if cached element exists


  • (array) preFetch(( ) $event)

    Listens the preFetch event of Doctrine_Connection_Statement

    advances the internal pointer of cached data and returns the current element


  • (array) preFetchAll(( ) $event)

    Listens the preFetchAll event of Doctrine_Connection_Statement

    returns the current cache data array


  • (boolean) preQuery(( ) $event)

    Listens on the Doctrine_Event preQuery event

    adds the issued query to internal query stack and checks if cached element exists


  • (array) readStats()

    Read stats file from disk


  • reset()

    Removes all queries from the query stack


  • $option the option name
    $value option value

    (boolean) setOption($option, $value)

    Set option name and value

    Doctrine_Cache


  • $driver cache driver name or a driver object
    $options cache driver options

    __construct((Doctrine_Cache_Interface|string) $driver, $options = array())

    constructor