We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

use Unix time in cache lifetime

Hi

How I can use Unix time in memcache lifetime?

any solution?!



98.9k

Currently the lifetime the number of seconds the cache must live in the memcached server, if you want to pass a unixtimestamp, you just have to substract it from the current time:

$ttl = time() - $myTimestamp;