|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-09-01 14:30 UTC] spam2 at rhsoft dot net
[2017-10-24 08:51 UTC] kalle@php.net
-Summary: apcu should not return stale data in cli mode
+Summary: APCu: apcu should not return stale data in cli mode
[2018-02-27 11:38 UTC] nikic@php.net
-Status: Open
+Status: Feedback
[2018-02-27 11:38 UTC] nikic@php.net
[2018-02-27 12:45 UTC] spam2 at rhsoft dot net
[2018-06-24 04:25 UTC] pecl-dev at lists dot php dot net
[2018-06-24 04:31 UTC] spam2 at rhsoft dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Description: ------------ "After the ttl has passed, the stored variable will be expunged from the cache (on the next request)" - fine, i don't care when it get purged phyiscally but i care when it lives forever in CLI mode the code below was intended to run within our cli-autotests but since there are no requests "apc.enable_cli = 1" is completly unuseable in a long running script because you get stale data forever i guess the check is done against $_SERVER['REQUEST_TIME'] which don't change and is fine in webserver-mode to save expensive time() calls but not in CLI mode apcu_store('shm_ttl_test', 'TTL TEST', 1); $cache_read = apcu_fetch('shm_ttl_test', $success); if($success !== true || $cache_read !== 'TTL TEST') { trigger_error('unexpected shm-read'); $return_value = 0; } sleep(1); $cache_read = apcu_fetch('shm_ttl_test'); $cache_read = apcu_fetch('shm_ttl_test'); if(!empty($cache_read)) { trigger_error("unexpected shm-read - value should have expired $cache_read"); $return_value = 0; }