File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
src/content/docs/en/reference/experimental-flags Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -555,11 +555,9 @@ export function myLoader(config): LiveLoader<MyData> {
555555 cacheHint: {
556556 // All fields are optional, and are combined with each entry's cache hints
557557 // tags are merged from all entries
558- // maxAge is the shortest maxAge of all entries and the collection
559558 // lastModified is the most recent lastModified of all entries and the collection
560559 lastModified: new Date (item .lastModified ),
561560 tags: [' products' ],
562- maxAge: 300 , // 5 minutes
563561 },
564562 };
565563 },
@@ -571,7 +569,6 @@ export function myLoader(config): LiveLoader<MyData> {
571569 cacheHint: {
572570 lastModified: new Date (item .lastModified ),
573571 tags: [` product-${item .id } ` , ` category-${item .category } ` ],
574- maxAge: 3600 , // 1 hour
575572 },
576573 };
577574 },
@@ -597,9 +594,6 @@ if (error) {
597594if (cacheHint?.tags) {
598595 Astro.response.headers.set('Cache-Tag', cacheHint.tags.join(','));
599596}
600- if (cacheHint?.maxAge) {
601- Astro.response.headers.set('Cache-Control', `s-maxage=${cacheHint.maxAge}`);
602- }
603597if (cacheHint?.lastModified) {
604598 Astro.response.headers.set('Last-Modified', cacheHint.lastModified.toUTCString());
605599}
You can’t perform that action at this time.
0 commit comments