Comments

lyricnz’s picture

Version: 6.x-1.0-rc1 » 7.x-1.x-dev

Quick research indicates that this would probably be identical to the APC engine, apart from:

apc_fetch($key) ==> zend_shm_cache_fetch($key)
apc_store($key, $cache, $expire) ==> zend_shm_cache_store($key, $cache, $expire)
apc_delete($key) ==> zend_shm_cache_delete($key)

and the "function_exists('apc_add'))" in lock().

I suppose some of flush() might be able to be replaced with zend_shm_cache_clear() too. I haven't tried this, but Zend also has a "zend_datacache.apc_compatibility" which makes some APC compatible methods available - which I suppose would work too.

lyricnz’s picture

Version: 7.x-1.x-dev » 6.x-1.0-rc1

I can provide a patch if you want.

andypost’s picture

Version: 7.x-1.x-dev » 6.x-1.0-rc1

+1 I've tested zend-ce and wondered it's performance.

Another idea is using it's namespace parameter for bins!

najibx’s picture

i use Zend-Server-Community-Edition for local dev/demo on window. would be helpful is supported :-)

andypost’s picture

Status: Active » Needs work

Suppose we need a config option to choose using SHM or DISK

But locking a lookup array is still issue

boolean zend_shm_cache_store(string namespace::key, mixed value, int ttl=0)
boolean zend_disk_cache_store(string namespace::key, mixed value, int ttl=0)

mixed zend_shm_cache_fetch(mixed namespace::key)
mixed zend_disk_cache_fetch(mixed namespace::key)

boolean zend_shm_cache_delete(mixed namespace::key)
boolean zend_disk_cache_delete(string namespace::key)

boolean zend_shm_cache_clear(string namespace)
boolean zend_disk_cache_clear(string namespace)

There's a good news

zend_datacache.apc_compatibility
When enabled, the Data Cache extension registers APC compatibility methods

Default value(s):
1:
Type: boolean
Measurement units:
Available since: 4.0
andypost’s picture

Status: Needs work » Postponed

it seems ZDC works fine as apc except break some tests with $user->cache

So lets postponed until 2.0 branch

bibo’s picture

Is there some proggress on this :)?

jwhat’s picture

Can we revive this? I'd like to use it.

lyricnz’s picture

Cacherouter development has basically stopped. Can't you just enable APC compatibility in your Zend install, and use that?