Zend Framework

Zend_Cache_Frontend_Class should not require cachedEntity in options

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.10.7
  • Component/s: Zend_Cache
  • Labels:
    None

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.

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Assigned to Fabien

Show
Thomas Weidner added a comment - Assigned to Fabien
Hide
Darien Hager added a comment -

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);

Show
Darien Hager added a comment - 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);
Hide
Fabien MARTY added a comment -

I agree, if someone wants to help...

Show
Fabien MARTY added a comment - I agree, if someone wants to help...
Hide
Steven Brown added a comment -

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

Show
Steven Brown added a comment - I'd be interested in helping...what's the process?
Hide
Steven Brown added a comment -

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

Show
Steven Brown added a comment - I think Darien's on the right track, though I'd recommend Zend_Cache_Frontend_Method
Hide
Fabien MARTY added a comment -

change Assignee because I'm inactive now

Show
Fabien MARTY added a comment - change Assignee because I'm inactive now
Hide
Marc Bennewitz (private) added a comment -

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)

Show
Marc Bennewitz (private) added a comment - 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)
Hide
Marc Bennewitz (private) added a comment -

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

Show
Marc Bennewitz (private) added a comment - Now it's possible to use all types of callbacks within Zend_Cache_Frontend_Function

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: