or Arc+RwLock for reading and thread task with mpsc::channel for cache writing without lock wait (managed-state <= tx)
https://rocket.rs/v0.4/guide/state/#managed-state
may be managed-state using [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html) + [RwLock](https://doc.rust-lang.org/std/sync/struct.RwLock.html)
or Arc+RwLock for reading and thread task with [mpsc::channel](https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html) for cache writing without lock wait (managed-state <= tx)
b4tman
changed title from lru cache for get_question or show_question_details to cache for get_question or show_question_details2023-04-02 17:01:22 +03:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
using https://lib.rs/crates/lru for example
https://rocket.rs/v0.4/guide/state/#managed-state
may be managed-state using Arc + RwLock
or Arc+RwLock for reading and thread task with mpsc::channel for cache writing without lock wait (managed-state <= tx)
or https://github.com/moka-rs/moka
lru cache for get_question or show_question_detailsto cache for get_question or show_question_detailsall ok