Page 1 of 1

How to set APC caching

Posted: Wed Jul 02, 2014 9:57 pm
by dangolvert
Hey guys.
I would like to see an example on how to cache with APC

for "file", this is the corresponding line

Code: Select all

$wurflConfig->cache('file', array('dir' => $cacheDir, 'expiration' => 36000));
for "apc" would be something like this?:

Code: Select all

$wurflConfig->cache('apc', array(/* What goes here? */));
I already have enabled APC in my webserver
thanks in advance

Re: How to set APC caching

Posted: Thu Jul 03, 2014 10:24 am
by Elliotfehr
Hello,

In order to use the APC driver, you will need to pass a namespace and an expiration. The default parameters can be found in WURFL/Storage/Apc.php on lines 26-29. I have also posted a sample config below:

Code: Select all

//86400 = 1 day
$wurflConfig->cache('apc', array('namespace' => 'wurfl', 'expiration' => '86400'));
Feel free to let us know if you have any further questions.

Thank you,

Elliot

Re: How to set APC caching

Posted: Thu Jul 03, 2014 11:18 am
by dangolvert
Thank you very much Elliot