Skip to content

Commit

Permalink
Update expire_value.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Sep 16, 2024
1 parent b9caf3c commit 4569bc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/expire_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub trait ValueProvider<T, E: Error + Send + Sync + 'static>: Send + Sync + 'sta
async fn provide(&self) -> Result<T, E>;
}

/// It keeps the value in memory while it's being used and while there are strong references to it.
///
/// After the specified `duration` it will remove it from internal cache and just keep it while there are strong references to it, after which it will be zeroized and dropped from memory.
pub struct ExpireValue<
T: Send + Sync + 'static,
E: Error + Send + Sync + 'static,
Expand Down

0 comments on commit 4569bc3

Please sign in to comment.