APC is very buggy and still has no support for PHP 5.5, but PHP 5.5. ha the Zend Optimizer opcode cache integrated.
So for now and for future it would be cool to support the Zend optimizer.

Comments

donquixote’s picture

Does Zend Optimizer have stuff equivalent to apc_fetch() and apc_store() ?
If so, feel free to produce a patch :)

bennos’s picture

hm
I have not looked at the code yet.
A question about the apc usage. It is used a key value storage or apc opcode cache function?
When just apc_fetch and apc_store is used, it looks like APC is used as key value storage. If so, then it would be easier to implement memcache and / or redis.

Make this a little bit more clear.

donquixote’s picture

It is used as a key/value store.

Of course if you have opcode caching enabled, this will also apply to the files loaded with xautoload. But xautoload does not really care about it.

You may also have a look into the Symfony code, they have decorator classes for apc, wincache and xcache.

donquixote’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Can you investigate:
- whether or not Zend Optimizer provides a key/value store? And if so, how to use it?
- How to use memcache or redis as a key/value store?

To use this stuff in xautoload, these caches need to allow single value read and write.

Marking as postponed until then.

bennos’s picture

Status: Postponed (maintainer needs more info) » Active

Memcache

It is a key value storage

https://drupal.org/project/memcache

It replaces the drupal database caches. some config is required in the settings.php.

functions to set, get, delete or validate a key value are in memcache.inc.

Zend Optimizer > now > ZendOPcache

http://pecl.php.net/package/ZendOpcache
From PHP 5.5 it is installed with PHP, lower versions can use the PECL extension.

It does the same as APC but a little faster.

here is the documentation and a list of the functions.
http://www.php.net/manual/en/ref.opcache.php

donquixote’s picture

So, memcache is a key/value store.
But ZendOPcache is not, from what I understand.

If you want to produce a patch based on memcache, go ahead!
For ZendOPcache, I don't see what xautoload has to do with it.

donquixote’s picture

Status: Active » Closed (won't fix)

xautoload-7.x-5.x now has two new cache options:
- APCu, the predecessor to APC that will still work with ZendOPcache.
- A "smart database cache".

If you want another one for memcache, please open a new issue.
I am closing this one as wontfix, since ZendOpCache is not a key/value store.

numerabilis’s picture

Drupal 7 does not need a module to run Zend Opcache?

donquixote’s picture

@numerabilis:
No, Drupal 7 does not need a module for Zend Opcache. The opcache does what it is meant to do natively, it does not need a module to tell it to do so.
On the other hand, xautoload uses a key/value cache such as APCU, to remember which class was found where. This has nothing to do with Zend Opcache.

So.. what do you people want or suggest?