aboutsummaryrefslogtreecommitdiffstats
path: root/src/cache
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2024-04-06 16:59:12 -0400
committeralyx <alyx@aleteoryx.me>2024-04-06 16:59:12 -0400
commita8046f11e551c69d1e45cd432694b4c8a04ee7b7 (patch)
tree6f9a5b02f8be209f46ff2c30d2d51ffc070a2226 /src/cache
parent79999cecedd84e99655fbcdba0bd4e715a22173f (diff)
downloadlfm_embed-a8046f11e551c69d1e45cd432694b4c8a04ee7b7.tar.gz
lfm_embed-a8046f11e551c69d1e45cd432694b4c8a04ee7b7.tar.bz2
lfm_embed-a8046f11e551c69d1e45cd432694b4c8a04ee7b7.zip
Lua dev mode functional
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);
+}