HHVM Memcache integration
Asked Answered
T

1

8

I have a Drupal 7 website with Memcache installed, which is working fine on an Apache2 web server. Now I've replaced Apache2 with HHVM (HipHop) and got a real boost on performance.

The problem is that obviously Drupal can not interact with the Memcache server. Here is the error:

Notice: Use of undefined constant MEMCACHE_COMPRESSED - assumed 'MEMCACHE_COMPRESSED' in dmemcache_set() (line 44 of /.../modules/memcache/dmemcache.inc).

and of course nothing is stored in the Memcache.

I suppose that Drupal's Memcache module is using PECL's Memcache:set() which is not available in this newly installed HHVM. Is there any PECL-like installation for HHVM?

Thanks

Tjirebon answered 25/10, 2013 at 16:19 Comment(1)
I'm looking toward that as well. Most php applications require at least mysql and memcache, and hhvm seems to be missing the memcache extension.Arneson
B
1

PECL extensions are unlikely to be compatible with HHVM, but "pure PHP" implementations might still work. It will be slower than something written in C, but the benefit of caching will probably outweigh any disadvantage in raw speed.

Someone already suggested that Drupal should include a pure PHP implementation in case the Memcache/Memcached extension is not available. The suggestion includes links to some of the alternatives, so check them out:

https://drupal.org/node/1999804

I took a a quick look at the first link, and unfortunately the methods and constants don't seem to be 100% compatible with the PECL extension. But you might be able to extend the class, add some missing constants, and change the order of arguments to match the methods of the PECL extension.

Brazilein answered 22/12, 2013 at 16:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.