# Kirby APCu cache at Dreamhost

**URL:** <https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144>\
**Category:** Questions\
**Tags:** v2\
**Created:** [January 27, 2016, 9:08pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144 "2016-01-27T21:08:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhawbert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rhawbert/32/586_2.png) [@rhawbert](https://forum.getkirby.com/u/rhawbert)\
**Post date:** [January 27, 2016, 9:08pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/1 "2016-01-27T21:08:40Z")

</div>

Could someone explain if kirby’s APC cache will work in php5.6?

It looks like PHP5.6 uses OPCache instead…

Any idea if OPcache actually works with kirby?

Any insights on kirby’s caching other than the following link would be appreciated

[https://forum.getkirby.com/t/cache-and-forms/1028?u=rhawbert](https://forum.getkirby.com/t/cache-and-forms/1028)

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [January 27, 2016, 9:15pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/2 "2016-01-27T21:15:18Z")

</div>

OPcache only caches PHP code, not data. APC did that as well in the past, but is no longer compatible with newer PHP versions (well, because PHP already does that by itself now).

The user cache from the APC extension has therefore been extracted into the APCu extension, which is a drop-in replacement for APC.  
You need to install this extension manually and can then set `c::set('cache.driver', 'apc')` to use it for the Kirby cache.

---

<div class="post-metadata">

**Author:** ![rhawbert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rhawbert/32/586_2.png) [@rhawbert](https://forum.getkirby.com/u/rhawbert)\
**Post date:** [January 27, 2016, 10:00pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/3 "2016-01-27T22:00:03Z")

</div>

I saw that homebrew has it, so ok on my local environment but I can’t find a single place explaining how to install APCu on Dreamhost…

I’m quite lost… not even sure if Dreamhost allows it… I guess they do since they allow OPcache and APC.

[edit]  
[https://serverpilot.io/community/articles/how-to-install-the-php-apcu-extension.html](https://serverpilot.io/community/articles/how-to-install-the-php-apcu-extension.html)  
but it looks like one needs **root** privileges… not on my humble shared server account ☹

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [January 27, 2016, 10:25pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/4 "2016-01-27T22:25:36Z")

</div>

They have a [wiki page on APC](http://wiki.dreamhost.com/APC). APCu should work in a similar way, but you need to change the download URL and the path to PHP of course. 🙂

---

<div class="post-metadata">

**Author:** ![rhawbert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rhawbert/32/586_2.png) [@rhawbert](https://forum.getkirby.com/u/rhawbert)\
**Post date:** [January 27, 2016, 10:52pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/5 "2016-01-27T22:52:16Z")

</div>

I’ve read that wiki… but this never occurred me… must be too tired.

Will give it a try tomorrow!

Thanks Lukas

---

<div class="post-metadata">

**Author:** ![rhawbert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rhawbert/32/586_2.png) [@rhawbert](https://forum.getkirby.com/u/rhawbert)\
**Post date:** [January 29, 2016, 7:04pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/6 "2016-01-29T19:04:05Z")

</div>

YES… managed to install APCu on a shared hosting account on Dreamhost.

Like Lukas instructed… I’ve just adapted the procedures [from the wiki page](http://wiki.dreamhost.com/APC)

My process is below in case anyone needs it:

apcu-4.0.10 is the (last) version compatible with php5.6 (when this was posted)

```auto
#connects via ssh / at home folder
$ wget https://pecl.php.net/get/apcu-4.0.10.tgz
$ tar xvf apcu-4.0.10.tgz
$ cd apcu-4.0.10
$ /usr/local/php56/bin/phpize
$ ./configure --with-php-config=/usr/local/php56/bin/php-config; make
$ cp ~/apcu-4.0.10/modules/apcu.so $HOME

# The phprc file is located at $HOME/.php/5.6/phprc
# add the following line to it:
extension = /home/YOURHOME/apcu.so

# Kill running PHP processes
killall -9 php56.cgi

```

The php info:

 ![](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/b/bea31377f59904eeb635cb688a31982954937f0f.png)

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [January 29, 2016, 8:06pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/7 "2016-01-29T20:06:14Z")

</div>

Thanks for sharing. 🙂

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:58pm UTC](https://forum.getkirby.com/t/kirby-apcu-cache-at-dreamhost/3144/8 "2025-02-06T16:58:07Z")

</div>

Archived on February 6, 2025, 4:58pm UTC


