Browse Source

feat: clear cache of random list

master
hole-thu 3 years ago
parent
commit
340d6da45c
  1. 8
      src/main.rs

8
src/main.rs

@ -50,6 +50,14 @@ async fn main() -> Result<(), rocket::Error> {
}
});
let rconn = RdsConn(rmc.clone());
tokio::spawn(async move {
loop {
cache::PostListCommentCache::init(3, &rconn).clear().await;
sleep(Duration::from_secs(5 * 60)).await;
}
});
rocket::build()
.mount(
"/_api/v1",

Loading…
Cancel
Save