HHVM and wpredis

I’ve been trying out the latest ee with --wpredis. If I install a brand new site using php-fpm, the redis caching seems to work as expected. If I use HHVM however, nothing seems to be stored in the cache.

These results are from two identical sites on the same ee enabled VM.

php-fpm, first visit:

X-Cache:MISS X-Cache-2:STORE

php-fpm, second visit:

X-Cache:HIT X-Cache-2:BYPASS

On both first and second visits using HHVM 3.8.0 I get this:

X-Cache:MISS X-Cache-2:BYPASS

I’m not sure if the issue exists because of the latest HHVM version.

I did some more testing with redis-cli. This is from my wpredis php-fpm site:

 "select" "0"
 "get" "nginx-cache:httpGETfpm.ee/2015/07/"
 "set" "nginx-cache:httpGETfpm.ee/2015/07/" <Big chunk of data>

This is in the response headers:

X-Cache:MISS
X-Cache-2:STORE

So it’s selecting database 0, checking the cache and since it’s not there, the cache is written to.

Reloading the browser:

"select" "0"
"get" "nginx-cache:httpGETfpm.ee/2015/07/"

Response headers:

X-Cache:HIT 
X-Cache-2:BYPASS

So the data is pulled from the cache.

OK this time with my wpredis HHVM site:

"select" "0"
"get" "nginx-cache:httpGEThhvm.ee/2015/07/"

nothing saved to the cache, the response headers:

X-Cache:MISS
X-Cache-2:BYPASS

reload the browser:

"select" "0"
"get" "nginx-cache:httpGEThhvm.ee/2015/07/"

and that’s it, nothing stored or retrieved from the cache.

Response headers:

X-Cache:MISS
X-Cache-2:BYPASS

So, ee with --wpredis isn’t working with HHVM. Unless someone else can tell me otherwise :slight_smile:

2 Likes

Same here. Full page caching doesn’t work on HHVM. Hopefully this will be fixed in the next release.

Just got wpredis and HHVM playing nicely with this setting added to fastcgi_params:

fastcgi_param  HTTP_ACCEPT_ENCODING      "";

I noticed that curl was causing the cache store to kick in but when I applied:

curl --compressed -I -X GET <site>

curl failed to affect the cache, just like my browser, hurrah!

1 Like

Thank you, @DaveNaylor, it does work for me, too. You da man!

Ha :slight_smile:

I decided to apply the fastcgi_param line to the bottom of redis-hhvm.conf here:

include fastcgi_params;
fastcgi_param  HTTP_ACCEPT_ENCODING      "";
fastcgi_pass hhvm;

This makes it more particular to redis/hhvm sites.

@DaveNaylor Thank you…