ZF-2066: Zend_Cache_Frontend_Class should not require cachedEntity in options

Description

Zend_Cache_Frontend_Class should not require cachedEntity in the options, instead you should be able to pass either a class name or object to a "call" method just like Zend_Cache_Frontend_Function. This allows use of the same cache object for methods of multiple classes or objects.

Comments

Assigned to Fabien

While I can see how that may be useful...

But I think it poses a risk of conflict with the established use. Whatever name you give the 'call method' you describe would have to be one that no underlying object would ever conflict with. So it cannot be "call()", but would have to be something like "zend_cache_call()".

Instead, it may be worth having Zend_Cache_Frontend_Object as a new class of it's own which has the behavior you describe.

$result = $cache->call($object,'methodName',$argumentArray);

I agree, if someone wants to help... :-)

I'd be interested in helping...what's the process?

I think Darien's on the right track, though I'd recommend Zend_Cache_Frontend_Method

change Assignee because I'm inactive now

for zend cache 2.0 i'm planning to add a new Callback cache which implements a (non overloaded) call method with the two arguments $callback & $arguments.

(The class & function cache leave similar as is - using magic methods)

Now it's possible to use all types of callbacks within Zend_Cache_Frontend_Function