ZF-5514: Function and Class frontends always call test() before load()


With some backends (like File) this is efficient., as test() is more efficient than load(). On other backends (like memcached), test() and load() are essentially the same (call _memcache->get), which means that for every cache hit there are two roundtrips to memcached. With such backends, the frontend should just call load() and see if it returns anything.

getCapabilities() can be potentially used to communicate backend's preference to the frontend


change Assignee because I'm inactive now

I think it has wide effect over many backends, if we would not call test() before load().

I want to know how much time would be saved by unifieing test() into load().

Added a patch.

This uses only load to get cached data and to detect uncached data. (load have to return false if cache doesn't hit by all backends)

Furthermore this patch check first if the cached result is an valid array for function/class frontend.

fixed in r20378 (trunk) & r20379 (1.10 branch)