happyfish100 / libshmcache

libshmcache is a local cache in the share memory for multi processes. high performance due to read is lockless. libshmcache is 100+ times faster than a remote interface such as redis.
449 stars 136 forks source link

能不能增加一个 单独设置过期时间的函数? #13

Closed jasonhe88 closed 4 years ago

jasonhe88 commented 7 years ago

比如

boolean ShmCache::setTtl(string $key, long $ttl)

谢谢这么好的东西,找好久了

happyfish100 commented 7 years ago

什么场景下需要更改key的ttl呢?

jasonhe88 commented 7 years ago

自己的业务场景吧,目前是用setValue把值重写一遍,加上更新的TTL

happyfish100 commented 7 years ago

已经支持了。 boolean ShmCache::setTTL(string $key, long $ttl); API详情参见README.md

jasonhe88 commented 7 years ago

@happyfish100 多谢啦!!