Add offline clip caching

This commit is contained in:
Codex
2026-04-23 13:55:15 -05:00
parent ec2f440c13
commit 51ac5b2060
20 changed files with 554 additions and 27 deletions

View File

@@ -12,6 +12,24 @@ export default defineConfig(({ mode }) => {
VitePWA({
registerType: "autoUpdate",
includeAssets: ["icon.svg"],
workbox: {
runtimeCaching: [
{
urlPattern: ({ url }) => url.pathname.startsWith("/api/media/files/"),
handler: "CacheFirst",
options: {
cacheName: "walkup-media",
cacheableResponse: {
statuses: [200],
},
expiration: {
maxEntries: 200,
maxAgeSeconds: 60 * 60 * 24 * 30,
},
},
},
],
},
manifest: {
name: "Walkup",
short_name: "Walkup",