apc_store isn't working between requests

前端 未结 3 1605
情书的邮戳
情书的邮戳 2021-01-05 09:19
$bar = \'BAR\';
apc_store(\'foo\', $bar);
var_dump(apc_fetch(\'foo\'));

Within one request this work.

Now If i try to do a var_dump(a

3条回答
  •  离开以前
    2021-01-05 09:33

    Your default ttl (apc.ttl) is 0 seconds, that is strange - please try to specify a ttl (in seconds) when storing the value:

    apc_store('foo', $bar, 60);
    

提交回复
热议问题