fix: include patterns in bufo cache key (#492)

cache key was just the query, so pattern config changes didn't
invalidate cached results. now includes exclude/include patterns
so config changes take effect immediately.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>

authored by zzstoatzz.io Claude and committed by GitHub 2634ed2c 8d7a5c5a

Changed files
+9 -8
frontend
src
lib
+9 -8
frontend/src/lib/components/BufoEasterEgg.svelte
··· 58 58 } 59 59 60 60 async function fetchBufos() { 61 - // check cache first 62 - const cached = getCached(query); 63 - if (cached) { 64 - bufos = cached; 65 - return; 66 - } 67 - 68 61 try { 69 62 // get patterns from props or config 70 63 let exclude = excludePatterns; ··· 73 66 const config = await getServerConfig(); 74 67 exclude = config.bufo_exclude_patterns ?? []; 75 68 include = config.bufo_include_patterns ?? []; 69 + } 70 + 71 + // cache key includes patterns so config changes invalidate cache 72 + const cacheKey = `${query}|${exclude.sort().join(',')}|${include.sort().join(',')}`; 73 + const cached = getCached(cacheKey); 74 + if (cached) { 75 + bufos = cached; 76 + return; 76 77 } 77 78 78 79 const params = new URLSearchParams({ ··· 91 92 const data = await response.json(); 92 93 bufos = data.results || []; 93 94 if (bufos.length > 0) { 94 - setCache(query, bufos); 95 + setCache(cacheKey, bufos); 95 96 } 96 97 } 97 98 } catch (e) {