feat: clear cache of random list

This commit is contained in:
2022-04-29 20:02:09 +08:00
parent c8dcaab936
commit 340d6da45c

View File

@@ -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() rocket::build()
.mount( .mount(
"/_api/v1", "/_api/v1",