Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Cache Component Proposal

Proposed Component Name Zend_Cache
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Cache
Proposers Fabien MARTY
Mislav MAROHNIC
Revision 1.1 - 1 August 2006: Updated from community comments. (wiki revision: 13)

Table of Contents

1. Overview

Zend_Cache is a generic caching module designed for high performances and for
a really safe use (file locking, anti-corruption tests...) even on really high
load. The core of Zend_Cache is really flexible and can be used to cache any
types of datas. Some frontends are available for specific caching needs (output
buffering, "method calls" caching...). Cached datas are stored by the choosen
backend (in files, in a SQLITE database...).

2. References

PEAR/Cache_Lite

3. Component Requirements, Constraints, and Acceptance Criteria

4. Dependencies on Other Framework Components

  • Zend_Exception
  • Zend_Log (optional)

5. Theory of Operation

First, the user use a static Zend_Cache::factory() call with backend, frontend
names and options as arguments. The factory builds the corresponding
Zend_Cache_Frontend_* object (which extends Zend_Cache_Core), sets the
corresponding backend object inside it, set corresponding options (for backend
and frontend) and returns the "ready to use" frontend.

Note : for perfs reasons, if you don't want any specific frontend, the
factory() method will return directly a Zend_Cache_Core object.

Then, the user will use this "ready to use" object. Available methods
depend on frontend type but for a classical use, there are 5 main methods :

  • get()
  • test()
  • save()
  • remove()
  • clean()

The main part of the "real work" of these methods will be delegated to the
corresponding backend object by the core.

6. Milestones / Tasks

Please see example milestones and then update this section

7. Class Index

  • Zend_Cache (public)
  • Zend_Cache_Core
  • Zend_Cache_Exception
  • Zend_Cache_Backend_Interface
  • Zend_Cache_Backend_File
  • Zend_Cache_Backend_Sqlite
  • Zend_Cache_Frontend_Class
  • Zend_Cache_Frontend_File
  • Zend_Cache_Frontend_Function
  • Zend_Cache_Frontend_Output

8. Use Cases

Use of the Core:

Use of the Output buffering frontend:

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Apr 25, 2007

    <p>Could I suggest that all the error suppressing @ signs be removed from Zend_Cache_Backend_Sqlite? If a server does not have sqlite enabled they should get the "Fatal error: Call to undefined function sqlite_open()" error message, but since the error is both fatal and suppressed you just get a blank screen and no indication of what is wrong.</p>

  2. Jun 12, 2007

    <p>Another suggestion, please change the function _makeId($name, $parameters) in the Zend_Cache_Frontend_Function class from private to protected. Classes extending this frontend will definitely need this method.</p>