ZF-2480: Zend_Cache_Frontend_Class does not cache by class
When using Zend_Cache_Frontend_Class to proxy an object, I can create two different objects of different classes with different caching proxy objects.
Unfortunately, as long as the function name is the same, they share results! The cache ID is based only on the function name and arguments.
I found this to be completely counterintuitive and not obvious from the documentation.
Proposal: When constructing the ID key to cache with, additionally use the classname of the object (determined by reflection on init) or string classname for static calls. This way, a cached result is not improperly shared across all objects and all classes that have the same method name and inputs.
Patch to implement/fix is attached.