Feature 12: Regular dinners and onboarding (#94)
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #94.
This commit is contained in:
+14
-5
@@ -24,14 +24,23 @@ export interface RouteRequest {
|
||||
mode: RequestMode
|
||||
}
|
||||
|
||||
// Bumping the version renames every cache; activate then deletes the old ones.
|
||||
export const cacheVersion = 'v1'
|
||||
// Each cache carries its own version. Bumping one renames only that cache;
|
||||
// activate then deletes its old name and keeps every other cache, so saved
|
||||
// photos and fonts stay available offline.
|
||||
export const cacheVersions = {
|
||||
precache: 'v1',
|
||||
// v2 retires the v1 API cache, whose dinner responses still carried the
|
||||
// pasted recipe_url.
|
||||
api: 'v2',
|
||||
media: 'v1',
|
||||
fonts: 'v1',
|
||||
} as const
|
||||
export const cachePrefix = 'mealquest-'
|
||||
|
||||
export const cacheNames = {
|
||||
api: `${cachePrefix}api-${cacheVersion}`,
|
||||
media: `${cachePrefix}media-${cacheVersion}`,
|
||||
fonts: `${cachePrefix}fonts-${cacheVersion}`,
|
||||
api: `${cachePrefix}api-${cacheVersions.api}`,
|
||||
media: `${cachePrefix}media-${cacheVersions.media}`,
|
||||
fonts: `${cachePrefix}fonts-${cacheVersions.fonts}`,
|
||||
} as const
|
||||
|
||||
export const networkTimeoutSeconds = 3
|
||||
|
||||
Reference in New Issue
Block a user