So I have some items stored in Rails.cache and I always write them with :expires_in => 5.minutes
My question is, is there a way to see what the ttl is on a cache entry?
I know the entry class in activesupport has a method but I can't seem to get an entry object out of Rails.cache methods.
I'm implementing rate limiting by the way.
You can check ttl in Rails cache using command below.
Rails.cache.data.ttl("yourkey")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With