How do I determine when data in memcached is supposed to expire?

322 views Asked by At

I am working on a PHP Laravel project as a tester and I am trying to test to make sure that some data in Memcached (running this locally) only expires after 30 days. But I am having trouble figuring out how to identify the expiration date/time of data in Memcached.

I tried using telnet and I am not having much luck there. I tried using a PHP-based Memcache tool. I have also tried a few clients that I found on the web but nothing seems to be working right (loading up without issues). Thoughts?

The PHP-based tool doesn't give an expiration date and I can't seem to access that information anywhere in any of the other tools. My local machine is an Ubuntu 12.10 box.

1

There are 1 answers

3
bitgarden On

You cannot retrieve that data from memcached. If you need it, serialize it with the object you are storing.

Here is a question similar to yours with good answers.