[英]How can I set Output cache in Downstream?
我可以管理一个单独的内存来存储我的缓存内容(asp.net输出缓存指令)吗?
I'm not sure I understand your question but downstream caches are controlled by the Cache-Control
header, the standard way to use downstream caches is to specify public
, ie Cache-Control:public
if your Cache-Control
header is set to private
, it will only be cached by the browser. 我不确定我是否理解您的问题,但是下游缓存由
Cache-Control
标头Cache-Control
,使用下游缓存的标准方法是指定public
,即Cache-Control:public
如果您的Cache-Control
标头设置为private
,它只会被浏览器缓存。 it's also recommended you set a max age like this: Cache-Control:public, max-age=31536000
(that will cache a static resource for a month). 还建议您设置如下所示的最长期限:
Cache-Control:public, max-age=31536000
(它将将静态资源缓存一个月)。
Also note that most down-stream caches will NOT cache any url with a ?
另请注意,大多数下游缓存都不会缓存带有
?
任何url ?
character, so it's recommended that you encode any parameters you need into the file-name or path. 字符,因此建议您将所需的任何参数编码到文件名或路径中。
More info on the google developer blog: 有关Google开发者博客的更多信息:
https://developers.google.com/speed/docs/best-practices/caching#LeverageBrowserCaching https://developers.google.com/speed/docs/best-practices/caching#LeverageBrowserCaching
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.