我试图使用此PHP代码清除用户缓存并从浏览器访问它:
<?php
apc_clear_cache();
apc_clear_cache('user');
apc_clear_cache('opcode');
echo json_encode(array(
'success' => true,
));
Run Code Online (Sandbox Code Playgroud)
但它不起作用.(我正在使用这些工具来查看它是否正常工作https://rtcamp.com/tutorials/php/zend-opcache/)
此外,当用户缓存已满时,它不会从0重新启动.APCu只是停止工作.
我试图设置apc.user_ttl=0
,但APCu不承认它.
我的设置是:
extension=apcu.so
apc.enabled=1
apc.shm_size=10240M
apc.ttl=7200
apc.enable_cli=1
apc.gc_ttl=3600
apc.entries_hint=4096
apc.slam_defense=0
apc.enable_cli = 1
apc.user_ttl=0
apc.serializer=igbinary
Run Code Online (Sandbox Code Playgroud)