I've got APC installed and caching op-code fine, and I'm preparing to use the data caching. I did a small test according to the manual:
Returns:
string(3) "BAR"
All good. Then I run just the fetch bit:
Returns:
bool(false)
It seems that the data is not caching beyond the execution of the file with apc_store in it. How to fix this? Or am I misunderstanding the way data caching works in APC? May be a silly question but I'm working with this for the first time and would appreciate help.
PHP:
<?php
$bar = 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));
?>
string(3) "BAR"
All good. Then I run just the fetch bit:
PHP:
<?php
var_dump(apc_fetch('foo'));
?>
bool(false)
It seems that the data is not caching beyond the execution of the file with apc_store in it. How to fix this? Or am I misunderstanding the way data caching works in APC? May be a silly question but I'm working with this for the first time and would appreciate help.