Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelvalle committed Sep 23, 2024
1 parent 61efc40 commit 711adad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/commands/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ impl Ttl {
pub fn duration(&self) -> Duration {
match self {
Ttl::Ex(seconds) => Duration::from_secs(*seconds),
Ttl::Px(millis) => Duration::from_millis(*millis),
// TODO: EXAT, PXAT and KeepTtl.
_ => Duration::from_secs(1),
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use std::sync::{Arc, Mutex, MutexGuard};
use tokio::sync::Notify;
use tokio::time::{sleep_until, Duration, Instant};

/// The Store is responsible for managing key-value pairs, with optional time-to-live (TTL)
/// settings for each key. It automatically handles the expiration and removal of keys when their
/// TTLs elapse. The store is designed to be thread-safe, allowing it to be shared and cloned
/// cheaply using reference counting.
/// The Store is responsible for managing key-value pairs, with optional time-to-live settings for
/// each key. It automatically handles the expiration and removal of keys when their TTLs elapse.
/// The store is designed to be thread-safe, allowing it to be shared and cloned cheaply using
/// reference counting.
#[derive(Clone)]
pub struct Store {
inner: Arc<InnerStore>,
Expand Down

0 comments on commit 711adad

Please sign in to comment.