`
TimerBin
  • 浏览: 355588 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

X-Cache 和 X-Cache-Lookup

    博客分类:
  • HTTP
 
阅读更多

在Http协议的Response Header中,可根据以下两项来判断是否被缓存命中。

X-Cache:HIT from www.cdn.com
X-Via:代理服务器地址信息

x-cache-lookup:指专门查看代理服务器中是否有某个网页缓存:有就返回HIT,没有返回MISS。

x-cache:项指浏览器从何处、是在哪个代理缓存载入的网页文件:服务器名后的3128指服务器端口。

注:X-Via 未查到相关资料说明

 

可通过对Response Header进行以下配置来进行设置,不被任何代理缓存命中,每次取最新信息

// Http 1.0 header
response.setDateHeader("Expires", 1L);
response.addHeader("Pragma", "no-cache");
// Http 1.1 header
response.setHeader("Cache-Control", "no-cache, no-store, max-age=0");

 

分享到:
评论

相关推荐

    web服务器缓存实现原理,通过chrome f12观察web服务器缓存

    web服务器缓存实现原理,通过chrome f12观察web服务器缓存 后台action命中缓存hit Via X-cache X-Cache-Lookup

    lookup-dns-cache:通过避免线程池并为特定主机名使用DNS TTL缓存来加速nodejs`dns.lookup`方法的实现

    const { lookup } = require ( 'lookup-dns-cache' ) ;// With "request" modulerequest ( { url : 'http://google.com' , method : 'GET' , lookup : lookup} , ( error , response , body ) => { // ...} ) ;// ...

    dns-lookup-cache:通过避免线程池并为特定主机名使用DNS TTL缓存来加速nodejs“ dns.lookup”方法的实现

    const { lookup } = require ( 'dns-lookup-cache' ) ; // With "request" module request ( { url : 'http://google.com' , method : 'GET' , lookup : lookup } , ( error , response , body ) => { // ... } ...

    Informatica Dynamic Lookup Cache

    Informatica Dynamic Lookup Cache A LookUp cache does not change once built. But what if the underlying lookup table changes the data after the lookup cache is created? Is there a way so that the cache...

    cacheable-lookup:尊重TTL的可缓存dns.lookup(…)

    使用lookup选项 const http = require ( 'http' ) ; const CacheableLookup = require ( 'cacheable-lookup' ) ; const cacheable = new CacheableLookup ( ) ; http . get ( 'http://example.com' , { lookup : ...

    geoip-lookup:获取有关 IP 地址的位置信息

    公开 2 个简单的 API, .lookup和.match 。 两者都是异步的,但.match将“阻止”回调,直到它检索到信息。 如果数据没有缓存在 LevelUp 本地数据库中,一旦数据被检索, .lookup将返回一个未定义的结果。 用法: ...

    wget-1.11.4-1

    GNU Wget 1.11.4,非交互式的网络文件下载工具。 用法: wget [选项]... [URL]... Mandatory arguments to long options are mandatory for short options too. ... -X, --exclude-directories=LIST list of excluded ...

    windows版wget命令

    -x, --force-directories force creation of directories. -nH, --no-host-directories don't create host directories. -P, --directory-prefix=PREFIX save files to PREFIX/... --cut-dirs=NUMBER ignore ...

    上网监控工具

    可以随时监测上网情况,和有无被攻击 X-NetStat is a program that displays information on your current Internet and network connections, much like the console netstat.exe program, but in a graphical ...

    windows版curl

    -x, --force-directories force creation of directories. -nH, --no-host-directories don't create host directories. -P, --directory-prefix=PREFIX save files to PREFIX/... --cut-dirs=NUMBER ignore ...

    linux.chm文档

    chmod ugo+rwx directory1 设置目录的所有人(u)、群组(g)以及其他人(o)以读(r )、写(w)和执行(x)的权限 chmod go-rwx directory1 删除群组(g)与其他人(o)对目录的读写执行权限 chown user1 file1 改变一个文件的...

    ICS delphixe10源码版

    and Mac OS-X projects. Note that latest C++ Builder version supported is XE3 (lack of spare time, sorry). ICS V9 is in early development and is planned to support Android. There are no current plans ...

    varnish缓存配置及其使用.doc

    如前述,如果 Cache-Control 或 Pragma 报头被设为 no-cache,则 vcl_fetch() 也拒绝缓存。 • 在代码中,pass 操作暗示 “通过”,或者对于这次单独的请求/响应交换不执行任何操作。pipe 还把数据不加改变地从客户...

    ImageMagick图片批量处理

    -display server get image or font from this X server -dispose method layer disposal method -dither method apply error diffusion to image -encoding type text encoding type -endian type endianness ...

    kernel panic - not syncing : fatal exception

    屏幕上显示: Fatal exception:panic in 5 seconds kernel panic - not syncing : fatal exception 之后就一直停在那里. 查了一些网站资料,大部分都是双CPU才发生的,有些是关闭:Hyper-Threading (HT)好了,...

    nis-utils-1.4.1

    * src/rpc.nisd/nisd_lookup.c (nis_lookup): Fix debug output. 2001-04-22 Thorsten Kukuk * src/keylogin/keylogin.c (main): Allow reading of password from stdin. * etc/rc.config.nisplus: Add ...

    squashfs2.2-r2.tar.gz

    generate a filesystem similar to a Squashfs 1.x filesystem. It will of course still be a Squashfs 2.0 filesystem but without fragments, and so it won't be mountable on a Squashfs 1.x system. The -...

    flexihash:Flexihash是一个小型PHP库,实现了一致的哈希

    Flexihash ... 安装 是推荐的安装技术。 你可以找到flexihash 所以安装一样简单 ...$ hash -> addTargets ([ 'cache-1' , 'cache-2' , 'cache-3' ]); // simple lookup $ hash -> lookup ( 'object-a' ); // "cache-1

    Squid中文权威指南

    16.1.4 "DNS name lookup tests failed" 16.1.5 "Illegal character in hostname" 16.1.6 "Running out of filedescriptors" 16.1.7 "icmpRecv: Connection refused" 16.1.8 在运行一段时间后,Squid变慢...

Global site tag (gtag.js) - Google Analytics