Closed reslear closed 1 year ago
hi userquin what is a better way for use case:
I have, an nginx proxy for aws up/ after the prefix, for example, https://site.com/up/bucket-folder/dir/image.jpg, how to cache dynamic images for /up/*.jpg or any file ext:
up/
https://site.com/up/bucket-folder/dir/image.jpg
/up/*.jpg
runtimeCaching: [ { urlPattern: /\/up\/.*\/*/, handler: 'CacheFirst', options: { cacheName: 'images-cache', expiration: { maxEntries: 10, maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days }, cacheableResponse: { statuses: [0, 200], }, }, }, ],
is the right solution?
I get 404 page, but it works after hard-reload in vite preview mode, don't understand why :(
works after add:
navigateFallbackDenylist: [ // exclude up: has its own cache /^\/up\//, ],
hi userquin what is a better way for use case:
I have, an nginx proxy for aws
up/
after the prefix, for example,https://site.com/up/bucket-folder/dir/image.jpg
, how to cache dynamic images for/up/*.jpg
or any file ext:is the right solution?
I get 404 page, but it works after hard-reload in vite preview mode, don't understand why :(