K
K
Kirill Kirkhov2010-11-12 14:00:25
PHP
Kirill Kirkhov, 2010-11-12 14:00:25

PHP memcache - get remaining time before deleting entry?

Or the time the entry was added to memcache.
Perhaps there is some undocumented method to get this value?
Of course, as an option, you can create an additional field where you can keep the exact time the entry was added, but this is an extreme case.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
slang, 2010-11-12
@slang

In memcached, when memory overflows, older objects are automatically deleted, so to provide for the moment of deletion is rather from the field of probability theory.

A
Alexey, 2010-11-12
@alexxxst

I have done so myself. In addition to the element with the “page_hash” key with the page itself, I also made an additional element with the “page_hash.time” key, in which the required timestamp sits. But this is for manual processing, I have a lot of memory given to the memcache , because the elements are not forced out from there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question