Articles of caching

在香草Ubuntu LAMP + virtualmin服务器,我如何允许caching?

我最近使用默认的LAMP任务设置了Ubuntu 12.04服务器。 还join了virtualmin。 所有对Apache的请求都会在头文件中返回。 Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0 我如何将caching控制设置为更明智的内容以允许浏览器caching内容? 试图把这个.htaccess无济于事。 mod_expires已启用。 结果是双caching控制标题! <IfModule mod_headers.c> Header add "Cache-Control" "max-age=3600" </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 3600 seconds" </IfModule>

可靠地testingColdFusion服务器的健康状况

的背景 我们在CF / Apache2后端服务器前运行一个Varnishcaching服务器。 清漆盒每两秒运行一次健康检查探针,如下所示: probe healthcheck { .url = "/probe.cfm"; .timeout = 5s; .interval = 2s; .window = 10; .threshold = 5; .initial = 5; .expected_response = 200; } backend web1 { .host = "<backend ip>"; .port = "80"; .probe = healthcheck; } probe.cfm这样做: <cfoutput> <!doctype html> <!–[if lt IE 7]> <html class="no-js ie6 […]

configurationSquidcaching从img显式调用的图像src =“”

而不是从我的应用程序热链接到外部图像,我想将它们caching在我的Web应用程序所在的服务器上,例如,而不是 <img src="http://api.domain.com/image/1234.jpeg" /> 我想调用caching,例如 <img src="http://dev:3128/myapp/image?href=http://api.domain.com/image/1234.jpeg"> 所以Squid有它将通过它的形象,否则它将检索,然后caching下一次。 这可能吗? 我已经安装了鱿鱼,将其configuration为Apache前面的反向代理。 我的configuration在下面(主机名是dev): acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 acl dev_users dstdomain dev http_access allow dev_users acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https […]

在nginx上select.jscaching

我有一个.js文件,不能被浏览器caching。 由于这个文件,我在我的nginxconfiguration文件中有这个: location ~* .(js)$ { expires epoch; log_not_found off; access_log off; } 然而,这太可怕了:因为一个文件,所有其他的.js文件不会被浏览器caching。 子域中有可能被caching的.js文件。 所以,我可以这样做: •不允许我的主公用文件夹上的所有.js文件被caching,并让所有在子文件夹上的文件都被caching。 我怎样才能在nginx中进行configuration? 谢谢。

可以鱿鱼2.7代理gzipped内容

我们有一个转发代理我们的networking是Squid 2.7。 这是由第三方为我们pipe理。 我们最近注意到,从我们的networking到networking的http请求被删除了Accept-Encoding标头。 这导致我们networking(大约8000多台PC)上的所有networkingstream量都是未压缩的,尽pipe每端的浏览器和服务器都是有效的。 我们要求第三方研究这个,他们说这是因为Squid 2.7不支持压缩。 我明白这是真实的,但我的印象是,压缩发生在networking服务器而不是代理服务器上。 所以… 可以鱿鱼2.7代理和/或caching内容gzipped? 如果可以的话,如何/为什么可以configurationAccept-Encoding标头被删除?

Apache目前加载了哪些configuration文件?

我在我的Ubuntu服务器上使用Openpanel(完全更新/升级昨晚),我有一个小问题,我敢肯定不是所有的configuration文件都包含在内,因此导致问题不redirect,不加载我的caching控制标题。 这看起来不太合适(这是它用来包含我的其他configuration的正则expression式) Include /etc/apache2/openpanel.d//davemackintosh.co.uk.inc/[^.#]* 而我的davemackintosh.co.uk.inc文件正在通过Apacheconfigurationtesting,我只是不认为他们被列入。 caching.conf proxy.conf <– This is definitely included otherwise my site wouldn't be up redirects.conf 除非我的configuration不正确,所以在这里他们是: caching.conf #Disable Last-Modified Response Header <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|html|rpc)$"> Header unset Last-Modified </FilesMatch> #Default Cache-control header for most static files <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=7200, public" </FilesMatch> # Revalidate For No-cache files each time <FilesMatch "\.nocache\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> […]

清漆不一致地从caching中逐出页面

在我们的清漆configuration中,我们有一个定义如下的vcl_fetch函数: if (beresp.ttl > 0s) { /* Remove Expires from backend, it's not long enough */ unset beresp.http.expires; /* Set the clients TTL on this object */ set beresp.http.cache-control = "max-age=900"; /* Set how long Varnish will keep it */ set beresp.ttl = 1h; /* marker for vcl_deliver to reset Age: */ set beresp.http.magicmarker = […]

如何在Windows Server上真正设置最大年龄标题?

我已经将最大年龄设置为1分钟,但是当我查看响应标题时,我看到max-age = 86400(一天)。 其他的东西是否重写了这个设置? 我也为大多数MIMEtypes设置了内核caching为1分钟,以确保它不是源代码。 还有其他地方我应该寻找一个覆盖? 另一个webconfig设置? 这是webconfig的相关部分。 <system.webServer> <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" /> <caching enabled="true"> <profiles> <add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" /> <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" /> <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" /> <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" /> <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" /> <add extension=".jpeg" policy="CacheUntilChange" […]

BIND9; 如何在条目到期后自动刷新条目

我正在寻找一种方法来自动刷新我的caching中的条目,如果到期。 例如,example.com的TTL为60,如果过期,我想自动刷新它,这样当用户查询example.com时,新版本已经在caching中了。 这是可能的绑定? 谢谢!

鱿鱼没有caching静态内容

通过查看Squid3 ,我发现Squid它不caching静态资源,例如: 1379041607.923 611 127.0.0.1 TCP_MISS/304 356 GET http://www.deckle.co.uk/squid-users-guide/css/site.css – DIRECT/95.172.21.186 – 这个css的请求返回一个TCP_MISS (甚至在重新加载之后),并且图像,javascripts,htmls等等也发生了同样的情况。实际上,几乎所有的请求都得到了TCP_MISS ,只有less数例外。 如果我们看一下这个头像,我们看到它应该caching它: $ http http://www.deckle.co.uk/squid-users-guide/css/site.css HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: max-age=604800 Content-Encoding: gzip Content-Length: 482 Content-Type: text/css Date: Fri, 13 Sep 2013 03:07:09 GMT ETag: "d6007-30e-4d2a2f615c780" Expires: Fri, 20 Sep 2013 03:07:09 GMT Last-Modified: Sun, 06 Jan 2013 18:34:22 GMT […]