Ack! You are, of course, right. I looked at the protocol documentation and completely failed to engage my brain enough to realize that the protocol documentation is… imprecise. Or at least unclear. Or at least lacks an appropriate definition of ‘age’.
My bad! -j On Mon, Jan 12, 2015 at 12:14 PM, dormando <[email protected]> wrote: > The only data stored are when the item expires, and when the last time it > was accessed. > > The "age" field (and evicted_time) is how long ago the oldest item in the > LRU was accessed. You can roughly tell how wide your LRU is with that. > > On Mon, 12 Jan 2015, 'Jay Grizzard' via memcached wrote: > > > I don’t think there’s a way to figure out when a given key was written. > If you really needed that, you could write it as part of the data you > > stored, or use the ‘flags’ field to store a unixtime timestamp. > > You can get the age of the oldest key, on a per-slab basis, with ‘stats > items’ and looking at the ‘age’ field. If you want the overall oldest age, > > you’ll have to find the oldest age value amongst all the slabs. > > > > Do note, though, that if you have evictions going on, ‘oldest’ is kind > of dubious, if you’re trying to use it as a “anything newer than this > > exists”, since evictions happen in lru order and per-slab, so younger > items can disappear before older ones, if they’re in a different slab or > have > > been accessed more recently. (Don’t know if that’s what you’re doing, > but just in case you are…) > > > > -j > > > > > > On Mon, Jan 12, 2015 at 9:34 AM, Gurdipe Dosanjh <[email protected]> > wrote: > > Hi All, > > > > I am new to memcache and need to know is there a where to work out when > the key was written to memcache and calculate the age of the oldest > > key on our memcache? > > > > Kind Regards > > > > Gurdipe > > > > -- > > > > --- > > You received this message because you are subscribed to the Google > Groups "memcached" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > > > --- > > You received this message because you are subscribed to the Google > Groups "memcached" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > > > > -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
