feat: change default image cache size to 210MB

Increase default cache size from 50MB to 210MB for better offline experience
This commit is contained in:
Gigi
2025-10-09 17:31:53 +01:00
parent 724a3e5cfa
commit 43d5554c0c
4 changed files with 6 additions and 6 deletions

View File

@@ -148,7 +148,7 @@ export async function fetchArticleByNaddr(
// Cache cover image if enabled and present
if (image && settings?.enableImageCache !== false) {
const maxSize = settings?.imageCacheSizeMB ?? 50
const maxSize = settings?.imageCacheSizeMB ?? 210
cacheImage(image, maxSize).catch(err => {
console.warn('Failed to cache article cover image:', err)
})

View File

@@ -44,7 +44,7 @@ export interface UserSettings {
rebroadcastToAllRelays?: boolean // Rebroadcast events to all relays
// Image cache settings
enableImageCache?: boolean // Enable caching images in localStorage
imageCacheSizeMB?: number // Maximum cache size in megabytes (default: 50MB)
imageCacheSizeMB?: number // Maximum cache size in megabytes (default: 210MB)
}
export async function loadSettings(