PHP 5.6.0 released

Expiration Times

Some storage commands involve sending an expiration value (relative to an item or to an operation requested by the client) to the server. In all such cases, the actual value sent may either be Unix time (number of seconds since January 1, 1970, as an integer), or a number of seconds starting from current time. In the latter case, this number of seconds may not exceed 60*60*24*30 (number of seconds in 30 days); if the expiration value is larger than that, the server will consider it to be real Unix time value rather than an offset from current time.

If the expiration value is 0 (the default), the item never expires (although it may be deleted from the server to make place for other items).

add a note add a note

User Contributed Notes 1 note

up
-6
info at tueena dot com
2 years ago
Note that if you pass the expiration time as an offset of seconds then the cache item will expire in current-second + offset, not in now + offset.

<?php
$Memcached
->add('foo', 42, 2);
?>

This item will expire in n seconds where n > 1 and <= 2, not in exactly 2 seconds.
To Top