Compare commits

...

3 Commits

Author SHA1 Message Date
Spythere 9ff9341851 Merge pull request #21 from Spythere/development
Wersja 1.8.2
2024-03-08 16:55:16 +01:00
Spythere f9276f6c71 bump: 1.8.2 2024-03-08 16:54:30 +01:00
Spythere f4f9a4729f poprawki cachowania 2024-03-08 16:54:08 +01:00
2 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pojazdownik", "name": "pojazdownik",
"version": "1.8.1", "version": "1.8.2",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+17 -3
View File
@@ -24,7 +24,7 @@ export default defineConfig({
runtimeCaching: [ runtimeCaching: [
{ {
urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i, urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i,
handler: 'NetworkFirst', handler: 'CacheFirst',
options: { options: {
cacheName: 'swdr-images-cache', cacheName: 'swdr-images-cache',
expiration: { expiration: {
@@ -37,10 +37,24 @@ export default defineConfig({
}, },
}, },
{ {
urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/.*/i, urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/data\/.*/i,
handler: 'NetworkFirst', handler: 'NetworkFirst',
options: { options: {
cacheName: 'spythere-api-cache', cacheName: 'spythere-api-data-cache',
expiration: {
maxEntries: 150,
maxAgeSeconds: 60 * 60 * 24, // <== 1 day
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/images\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'spythere-api-images-cache',
expiration: { expiration: {
maxEntries: 150, maxEntries: 150,
maxAgeSeconds: 60 * 60 * 24, // <== 1 day maxAgeSeconds: 60 * 60 * 24, // <== 1 day