phpDocumentor Cotonti
[ class tree: Cotonti ] [ index: Cotonti ] [ all elements ]

Class: Writeback_cache_driver

Source Location: /cache.php

Class Writeback_cache_driver

Class Overview

Persistent cache driver that writes all entries back on script termination.

Persistent cache drivers work slower but guarantee long-term data consistency.

Located in /cache.php [line 120]

Dynamic_cache_driver
   |
   --Writeback_cache_driver
Author(s):
API Tags:
Abstract:  

Properties

Methods

[ Top ]
Descendants
Child Class Description
Db_cache_driver Query cache drivers are driven by database

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Dynamic_cache_driver

Dynamic_cache_driver::store()
Stores data as object image in cache

[ Top ]
Property Summary
mixed   $removed_data   Keys that are to be removed
array   $writeback_data   Values for delayed writeback to persistent cache

[ Top ]
Method Summary
void   __destruct()   Writes modified entries back to persistent storage
void   remove()   Removes cache image of the object from the database
bool   remove_now()   Removes item immediately, avoiding writeback.
bool   store()   Stores data as object image in cache
bool   store_now()   Writes item to cache immediately, avoiding writeback.

[ Top ]
Properties
mixed   $removed_data = array() [line 130]

Keys that are to be removed

API Tags:
Access:  protected


[ Top ]
array   $writeback_data = array() [line 126]

Values for delayed writeback to persistent cache

API Tags:
Access:  protected


[ Top ]
Methods
Destructor __destruct  [line 135]

  void __destruct( )

Writes modified entries back to persistent storage


API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
remove  [line 142]

  void remove( string $id, [string $realm = COT_DEFAULT_REALM]  )

Removes cache image of the object from the database

Parameters:
string   $id:  Object identifier
string   $realm:  Realm name

API Tags:
Access:  public


[ Top ]
remove_now  [line 154]

  bool remove_now( string $id, [string $realm = COT_DEFAULT_REALM]  )

Removes item immediately, avoiding writeback.

Parameters:
string   $id:  Item identifirer
string   $realm:  Cache realm

API Tags:
See:  Cache_driver::remove()
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
store  [line 165]

  bool store( string $id, mixed $data, [string $realm = COT_DEFAULT_REALM], [int $ttl = 0]  )

Stores data as object image in cache

Parameters:
string   $id:  Object identifier
mixed   $data:  Object value
string   $realm:  Realm name
int   $ttl:  Time to live, 0 for unlimited

API Tags:
See:  Cache_driver::store()
Access:  public


Redefinition of:
Dynamic_cache_driver::store()
Stores data as object image in cache

[ Top ]
store_now  [line 179]

  bool store_now( string $id, mixed $data, [string $realm = COT_DEFAULT_REALM], [int $ttl = COT_DEFAULT_TTL]  )

Writes item to cache immediately, avoiding writeback.

Parameters:
string   $id:  Object identifier
mixed   $data:  Object value
string   $realm:  Realm name
int   $ttl:  Time to live, 0 for unlimited

API Tags:
See:  Cache_driver::store()
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]

Documentation generated on Fri, 19 Mar 2010 17:45:22 +0000 by phpDocumentor 1.4.3