al8n / stretto

Stretto is a Rust implementation for Dgraph's ristretto (https://github.com/dgraph-io/ristretto). A high performance memory-bound Rust cache.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] Getting TTL value of entry

ClSlaid opened this issue · comments

proposing a new method that gets ttl value of an entry.

let val_ref = cache.get(&key).unwrap();
let ttl: std::time::Duration = val_ref.ttl();
let value = val_ref.value();

Hi @ClSlaid, I am busy in recent weeks, I may have a look this weekend if I have time, would you like to help implement this feature?

Hi @ClSlaid, I am busy in recent weeks, I may have a look this weekend if I have time, would you like to help implement this feature?

It's pretty hard, so many generic quotes go bruhhhh...

I'll see what I can do...