downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

コールバック> <定義済み定数
[edit] Last updated: Fri, 11 May 2012

view this page in

有効期限

格納用コマンドの中には、(アイテム単位あるいはクライアントから要求された操作単位の) 有効期限をサーバーに送信するものがあります。そのような場合に実際に送られる値は、 Unix タイム (1970 年 1 月 1 日からの経過秒数) あるいは現在時刻からの秒数となります。 後者の場合、最大の秒数は 60*60*24*30 (30 日間をあらわす秒数) までとなります。 もし有効期限がそれより長い場合は、現在時刻からの経過秒数ではなく Unix タイムであるとサーバーにみなされてしまいます。

有効期限を 0 (デフォルト) にすると、 アイテムは期限切れにならなくなります (しかし、他のアイテム用の場所を確保するためにサーバーから削除されることもありえます)。



add a note add a note User Contributed Notes 有効期限
info at tueena dot com 25-Jan-2012 01:54
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.

 
show source | credits | sitemap | contact | advertising | mirror sites