Key timeout expiration behavior and stats
Hello, I'm using the Java Client and CouchBase 2.0.1 community edition (build-185)
I'm writing a provider to allow CFML developers to use CouchBase inside a cache aggregator called CacheBox (part of the ColdBox platform). I'm trying to get the correct metadata from the CouchBase keys for the reporting portion of the library. Data I would ideally like to get for all keys in the bucket is:
- Key Name (retrieved via view)
- Hits (Not sure this is possible)
- Timeout (time before item expires regardless of hit count)
- IdleTimeout (time before item expires counted since last hit-- I don't think CouchBase support this))
- Created (time key created -- This does not appear to exist in key stats)
- Last Accessed (Time key was last "hit")
- Status (active/expired)
I been playing with the stats that are available for a bit but haven't been able to nail down some specific answers after a bit of Googling so I wanted to confirm here.
Can I determine from the key stats what the initial timeout of a key was set to when it was first set into the bucket?
Also, can I see when a key was created?
The next question: is there a date that stores the last hit to a key? The key_last_modification_time key stat appears to change to the current time every time I access the stats, however the expiration date doesn't change. So it basically _always_ looks like my keys were just touched. Is this a bug since viewing stats doesn't seem like it should count as "modifying" the key.
And finally, I think I saw an answer to this floating around Google, but to confirm, are there key-level hit and miss stats available?
Thanks for your help.