![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /usr/local/src/apcu-5.1.19/tests/ |
--TEST-- Test default expunge logic wrt global and per-entry TTLs --SKIPIF-- <?php require_once(__DIR__ . '/skipif.inc'); if (!function_exists('apcu_inc_request_time')) die('skip APC debug build required'); ?> --INI-- apc.enabled=1 apc.enable_cli=1 apc.use_request_time=1 apc.ttl=1 apc.shm_size=1M --FILE-- <?php apcu_store("no_ttl_unaccessed", 12); apcu_store("no_ttl_accessed", 24); apcu_store("ttl", 42, 3); apcu_store("dummy", "xxx"); apcu_inc_request_time(1); apcu_fetch("no_ttl_accessed"); apcu_inc_request_time(1); // Fill the cache $i = 0; while (apcu_exists("dummy")) { apcu_store("key" . $i, str_repeat('x', 500)); $i++; } var_dump(apcu_fetch("no_ttl_unaccessed")); var_dump(apcu_fetch("no_ttl_accessed")); var_dump(apcu_fetch("ttl")); ?> --EXPECT-- bool(false) int(24) int(42)