| New Proposal Template This page has been created from a template that uses "zones." To proceed:
|
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
The current Zend_Cache component is very inflexible with it's Frontend/Backend structure. It's not possible to merge different frontens together (e.g. MasterFile and Page cache). Furthermore, few advantages of some cache storage systems are not derived by Zend_Cache. E.g. some storage systems can handle different data-types but Zend_Cache only permit strings.
Zend Framework: Zend\Cache Component Proposal
Proposed Component Name
Zend\Cache
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend\Cache
Proposers
Marc Bennewitz
Pádraic Brady ?
Zend Liaison
TBD
Revision
1.0 - 7 March 2010: Initial Draft. (wiki revision: 8)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
TODO
Most requirements take the form of "foo will do ...." or "foo will not support ...", although different words and sentence structure might be used. Adding functionality to your proposal is requirements creep (bad), unless listed below. Discuss major changes with your team first, and then open a "feature improvement" issue against this component.
- This component will correctly reads a developers mind for intent and generate the right configuration file.
- The generated config file will not support XML, but will provide an extension point in the API.
- This component will use no more memory than twice the size of all data it contains.
- This component will include a factory method.
- This component will not allow subclassing. (i.e. when reviewed, we expect to see "final" keyword in code)
- This component will only generate data exports strictly complying with RFC 12345.
- This component will validate input data against formats supported by ZF component Foo.
- This component will not save any data using Zend_Cache or the filesystem. All transient data will be saved using Zend_Session.
4. Dependencies on Other Framework Components
- Zend\Serializer
- Zend\Loader\PluginLoader
- Zend\Exception
See: http://framework.zend.com/svn/framework/standard/branches/user/mabe/zend_cache-2.0
5. Theory of Operation
Storage Adapter:
The storage adapters are classes of wrappers of the existing storage engines usable for caching (Memcache, Database, File-system ...).
They all implement an interface to get a consistent API but only reflect supported facilities of the used storage engine.
Storage Plugins:
Precisely because the storage adapters supports different facilities you can add facilities belated with the storage plugins.
(e.g. tag support, automatic serialize). The storage plugins have the same API as the storage adapters and therefor implement
the same interface. Where ever a storage adapter is required you can use a storage plugin and you can merge all storage plugins
as you like. The storage plugins self don't storage any data - they need a storage adapter as storage engine.
A special storage plugin is the base cache class (Zend\Cache). It implements additional methods for simpler handling lists of
plugins within the own object. Additionally to enable/disable the cache.
Special Cache Patterns:
Some special cache patterns shouldn't use the standard cache API. They are: Output, Page, Function, Class and Callback.
These caches don't have an interface and implement it's own API.
6. Milestones / Tasks
- Milestone 1: Finish proposal
- Milestone 2: Working prototype
- Milestone 3: Prototype checked into the incubator
- Milestone 4: Unit tests exist finished and component is working
- Milestone 5: Initial documentation exists
- Milestone 6: Changed related components
- Milestone 7: Moved to core.
7. Class Index
Storage Adapter:
- interface Zend\Cache\StorageAdapter\StorageAdapterInterface
- abstract Zend\Cache\StorageAdapter\StorageAdapterAbstract implements Zend\Cache\StorageAdapter\StorageAdapterInterface
- class Zend\Cache\StorageAdapter\Variable extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\Memcache extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\Apc extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\Xcache extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\ZendServerShm extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\ZendServerDisk extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\ZendPlatform extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\Database extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
- class Zend\Cache\StorageAdapter\Filesystem extends Zend\Cache\StorageAdapter\StorageAdapterAbstract
Storage Plugins:
- interface Zend\Cache\StoragePlugin\StoragePluginInterface extends Zend\Cache\StorageAdapter\StorageAdapterInterface
- abstract Zend\Cache\StoragePlugin\StoragePluginAbstract implements Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\AutomaticClear extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\AutomaticOptimize extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\EscapeKey extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\ExceptionHandler extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\ExceptionLogger extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\FileMTime extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\FileATime extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\FileCTime extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\FileHash extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\IgnoreUserAbort extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\MTime extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\Prefix extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\Serialize extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\Tagging extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\TwoLevels extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache\StoragePlugin\WriteControl extends Zend\Cache\StoragePlugin\StoragePluginAbstract
- class Zend\Cache extends Zend\Cache\StoragePlugin\StoragePluginAbstract
Special Cache Patterns:
- class Zend\Cache\CallbackCache
- class Zend\Cache\ClassCache
- class Zend\Cache\FunctionCache
- class Zend\Cache\OutputCache
- class Zend\Cache\PageCache
Exceptions
- interface Zend\Cache\Exception extends Zend\Exception
- class Zend\Cache\InvalidArgumentException extends \InvalidArgumentException implements Zend\Cache\Exception
- class Zend\Cache\UnexpectedValueException extends \UnexpectedValueException implements Zend\Cache\Exception
- class Zend\Cache\LoaderException extends \Exception implements Zend\Cache\Exception
- TODO: Zend_Cache_Manager
- TODO: Zend_Cache_Frontend_Capture
- TODO: Zend_Cache_Backend_Static
- TODO: Zend_Cache_Backend_BlackHole - Is this needed anymore ?
8. Use Cases
9. Class Skeletons
]]></ac:plain-text-body></ac:macro>