Memcache如何保存数据过期时间为31天?
2016-07-26 13:44
573 查看
set、add方法的最后一个参数(默认值为0,表示永不过期),可以有两种写法:
有效期(秒数) 允许的最大值为30天,即3600*24*30。
时间点(时间戳) time()+3600*24*31,故可以用时间戳的形式,将数据的过期时间设置为31天。
有效期(秒数) 允许的最大值为30天,即3600*24*30。
时间点(时间戳) time()+3600*24*31,故可以用时间戳的形式,将数据的过期时间设置为31天。
相关文章推荐
- memcache的学习路线图
- CentOS 下安装 Memcache
- 面向对象的方法操作memcache 面向过程编程
- PHP的51个Memcached方法(22-31)
- PHP的51个Memcached方法(12-21)
- Python操作Redis、Memcache
- memcache统计同一数据搜索次数,设置缓存
- Session入redis 入memcache
- Redis和Memcached的区别
- memcache 分布式
- phpMemcache图形化工具
- redis和memcache
- 和mysql比较,进行理解memcache
- Memcached安装配置
- PHP的51个Memcached方法(1-11)
- 在 Cent OS 7 上搭建带着 PHP 7 和 Memcached 的 LAMP
- 使用Memcache缓存mysql数据库操作的原理和缓存过程浅析
- Redis和Memcached的区别?
- dubbo,MemCache和Nginx初识等服务器组件
- memcached学习笔记