I'm not sure if this can be done at all.
I'm trying to set Dalli to delete a memcache after 3 seconds (just to experiment)
dalli = Dalli::Client.new
dalli.add("test1","value", 3)
dalli.get("test1").should eql "value"
sleep(10)
dalli.get("test1").should eql nil
In the code, I have set TTL for 3 seconds, and then I expect that after 3 seconds the "test1" would be deleted but apparently not. So, the test fails in the second assertion. How can I ask Dalli to expire a key/value after a certain amount of time?
Thanks a lot.