From a1cf3fcee0df02aac0e5ac167cff83fdc21a6c3a Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Sat, 15 Feb 2025 08:32:23 -0600 Subject: [PATCH] collect image garbage faster --- components/Global/components/blurhashed-image.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Global/components/blurhashed-image.tsx b/components/Global/components/blurhashed-image.tsx index f6d8668e..6dc06289 100644 --- a/components/Global/components/blurhashed-image.tsx +++ b/components/Global/components/blurhashed-image.tsx @@ -32,8 +32,8 @@ export default function BlurhashedImage({ Math.ceil(height ?? width / 100) * 100 // So these keys need to match ], queryFn: () => fetchItemImage(item.Id!, type ?? ImageType.Primary, width, height ?? width), - staleTime: (1000 * 60 * 60) * 24, // 1 day, - gcTime: (1000 * 60 * 5) * 1 // 5 minutes + staleTime: (1000 * 60 * 60) * 24, // 1 day, images probably don't refresh that often + gcTime: (1000 * 30 * 1) * 1 // 30 seconds, these are stored on disk anyways so refetching is cheap });; const blurhash = !isEmpty(item.ImageBlurHashes)