Skip to content

Commit

Permalink
Tweak some doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuya6502 committed Jan 29, 2024
1 parent afc8c6b commit 27dd941
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/future/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,15 @@ use std::sync::atomic::{AtomicBool, Ordering};
///
/// - [Example: `insert`, `get` and `invalidate`](#example-insert-get-and-invalidate)
/// - [Avoiding to clone the value at `get`](#avoiding-to-clone-the-value-at-get)
/// - [Sharing a cache across asynchronous
/// tasks](#sharing-a-cache-across-asynchronous-tasks)
/// - [Sharing a cache across asynchronous tasks](#sharing-a-cache-across-asynchronous-tasks)
/// - [No lock is needed](#no-lock-is-needed)
/// - [Hashing Algorithm](#hashing-algorithm)
/// - [Example: Size-based Eviction](#example-size-based-eviction)
/// - [Example: Time-based Expirations](#example-time-based-expirations)
/// - [Cache-level TTL and TTI policies](#cache-level-ttl-and-tti-policies)
/// - [Per-entry expiration policy](#per-entry-expiration-policy)
/// - [Example: Eviction Listener](#example-eviction-listener)
/// - [You should avoid eviction listener to
/// panic](#you-should-avoid-eviction-listener-to-panic)
/// - [You should avoid eviction listener to panic](#you-should-avoid-eviction-listener-to-panic)
///
/// # Example: `insert`, `get` and `invalidate`
///
Expand Down Expand Up @@ -153,8 +151,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
/// - Create a clone of the cache by calling its `clone` method and pass it to other
/// task.
/// - If you are using a web application framework such as Actix Web or Axum, you can
/// store a cache in Actix Web's [`web::Data`][actix-web-data] or Axum's [shared
/// state][axum-state-extractor], and access it from each request handler.
/// store a cache in Actix Web's [`web::Data`][actix-web-data] or Axum's
/// [shared state][axum-state-extractor], and access it from each request handler.
/// - Wrap the cache by a `sync::OnceCell` or `sync::Lazy` from
/// [once_cell][once-cell-crate] create, and set it to a `static` variable.
///
Expand All @@ -163,8 +161,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
///
/// [once-cell-crate]: https://crates.io/crates/once_cell
/// [actix-web-data]: https://docs.rs/actix-web/4.3.1/actix_web/web/struct.Data.html
/// [axum-state-extractor]:
/// https://docs.rs/axum/latest/axum/#sharing-state-with-handlers
/// [axum-state-extractor]: https://docs.rs/axum/latest/axum/#sharing-state-with-handlers
///
/// ## No lock is needed
///
Expand Down

0 comments on commit 27dd941

Please sign in to comment.