mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix: culture data change must not ignore lock status
This commit is contained in:
parent
8a1122e668
commit
660316e4bf
6 changed files with 14 additions and 17 deletions
8
sw.js
8
sw.js
|
|
@ -8,7 +8,10 @@ const {ExpirationPlugin} = workbox.expiration;
|
|||
const DAY = 24 * 60 * 60;
|
||||
|
||||
const getPolitics = ({entries, days}) => {
|
||||
return [new CacheableResponsePlugin({statuses: [0, 200]}), new ExpirationPlugin({maxEntries: entries, maxAgeSeconds: days * DAY})];
|
||||
return [
|
||||
new CacheableResponsePlugin({statuses: [0, 200]}),
|
||||
new ExpirationPlugin({maxEntries: entries, maxAgeSeconds: days * DAY})
|
||||
];
|
||||
};
|
||||
|
||||
registerRoute(
|
||||
|
|
@ -21,7 +24,8 @@ registerRoute(
|
|||
);
|
||||
|
||||
registerRoute(
|
||||
({request, url}) => request.destination === "script" && !url.pathname.endsWith("min.js") && !url.pathname.includes("versioning.js"),
|
||||
({request, url}) =>
|
||||
request.destination === "script" && !url.pathname.endsWith("min.js") && !url.pathname.includes("versioning.js"),
|
||||
new CacheFirst({
|
||||
cacheName: "fmg-scripts",
|
||||
plugins: getPolitics({entries: 100, days: 30})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue