Be careful when updating same key with ttl set during same request. For example:
<?php
for ($i = 0; $i < 20; $i++) {
apcu_store('test', $i, 10);
sleep(1);
}
?>
After 10 seconds the key will become not available and won't be updated. Tested on Windows and Linux platforms. Not sure if it's a bug or undocumented behavior.