File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ When using the Cache-Control header, you can omit the custom `x-cache-timeout` h
8383
8484#### Direct usage:
8585``` js
86- res .setHeader (' cache-control' , ` private, no-cache, max-age=${ 60 * 5 } ` )
86+ res .setHeader (' cache-control' , ' private, no-cache, max-age=300 ' )
8787res .setHeader (' etag' , ' 1' )
8888
8989res .end (' 5 minutes cacheable content here....' )
@@ -96,7 +96,7 @@ res.setHeader('x-cache-timeout', '5 minutes')
9696```
9797The middleware will now transparently generate default ` Cache-Control ` and ` ETag ` headers as described below:
9898``` js
99- res .setHeader (' cache-control' , ` private, no-cache, max-age=300` )
99+ res .setHeader (' cache-control' , ' private, no-cache, max-age=300' )
100100res .setHeader (' etag' , ' 1' )
101101```
102102This will enable browser clients to keep a copy of the cache on their side, but still being forced to validate
You can’t perform that action at this time.
0 commit comments