How to set APC caching

dangolvert
Posts: 2
Joined: Wed Jul 02, 2014 9:51 pm

How to set APC caching

Postby dangolvert » Wed Jul 02, 2014 9:57 pm

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

Elliotfehr

Re: How to set APC caching

Postby Elliotfehr » Thu Jul 03, 2014 10:24 am

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

dangolvert
Posts: 2
Joined: Wed Jul 02, 2014 9:51 pm

Re: How to set APC caching

Postby dangolvert » Thu Jul 03, 2014 11:18 am

Thank you very much Elliot


Who is online

Users browsing this forum: No registered users and 1 guest