aboutsummaryrefslogtreecommitdiffstats
path: root/src/cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache')
-rw-r--r--src/cache/font.rs4
-rw-r--r--src/cache/user.rs4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/cache/font.rs b/src/cache/font.rs
index 5be2196..a238a87 100644
--- a/src/cache/font.rs
+++ b/src/cache/font.rs
@@ -57,3 +57,7 @@ static FONT_CACHE: LazyLock<FontCache> = LazyLock::new(|| {
pub async fn get_fontinfo(font: &String) -> Result<Arc<str>, (StatusCode, &'static str)> {
FONT_CACHE.write().await.get_owned(font).await
}
+
+pub fn touch() {
+ LazyLock::force(&FONT_CACHE);
+}
diff --git a/src/cache/user.rs b/src/cache/user.rs
index e228cc2..8d6bf64 100644
--- a/src/cache/user.rs
+++ b/src/cache/user.rs
@@ -101,3 +101,7 @@ pub async fn get_userinfo(user: &String) -> (Result<Arc<(User, Track, TrackStub)
}
}
}
+
+pub fn touch() {
+ LazyLock::force(&ALLOWLIST);
+}