Memcache maximum key expiration time

前端 未结 7 1129
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 03:45

What\'s memcached\'s maximum key expiration time?

If I don\'t provide an expiration time and the cache gets full, what happens?

7条回答
  •  半阙折子戏
    2020-12-05 04:26

    No there is no limit. The 30 days limit is if you give the amount of seconds it should stay there, but if you give a timestamp, there is only the max long or int value on the machine which can be a limit.

    ->set('key', 'value', time() + 24*60*60*365) will make the key stay there for a year for example, but yeah if the cache gets full or restarted in between, this value can be deleted.

提交回复
热议问题