From a8046f11e551c69d1e45cd432694b4c8a04ee7b7 Mon Sep 17 00:00:00 2001 From: alyx Date: Sat, 6 Apr 2024 16:59:12 -0400 Subject: Lua dev mode functional --- src/cache/font.rs | 4 ++++ src/cache/user.rs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/cache') 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 = LazyLock::new(|| { pub async fn get_fontinfo(font: &String) -> Result, (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