php - Zend data cache TTL not working -


i'm using zend_shm_cache functions fast storage of variables. problem cache doesn't seem cleared after ttl over. example:

zend_shm_cache_store( $key = 'test3', 'value', 2 ); foreach( range(1,5) $timer ){     sleep( 1 );     echo $timer.' - ' .zend_shm_cache_fetch( $key ).'<br/>'; } 

returns:

 1 - value 2 -  3 - value 4 - value 5 - value 

i expect cache empty after second second. can explain what's happening or propose solution?

i got answer in documentation of apcu:

after ttl has passed, stored variable expunged cache (on next request).

as code runs in 1 request cache never deleted when time has expired.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -