Mercurial > lbo > hg > memoize
changeset 36:7723677c1a0e
Update README.md
author | inferrna <inferrna@gmail.com> |
---|---|
date | Thu, 10 Dec 2020 19:37:33 +0200 |
parents | db9afeb14f1d |
children | 39b49b493180 |
files | README.md |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Fri Dec 11 01:31:57 2020 +0800 +++ b/README.md Thu Dec 10 19:37:33 2020 +0200 @@ -78,7 +78,8 @@ parameter such as `Capacity` without the feature `full` being enabled. -Another parameter is TimeToLive. Example: +Another parameter is TimeToLive - it targeting to refresh outdated values. +Example: ```rust #[memoize(Capacity: 123, TimeToLive: Duration::from_secs(2))] ``` @@ -86,6 +87,7 @@ ```rust #[memoize(TimeToLive: chrono::Duration::hours(3).to_std().unwrap())] ``` +cached value will be actual no longer than duration provided and refreshed with next request. ## Contributions