当程序需要第k+1层中的某个数据时d,会首先在它的缓存k层中寻找。如果数据刚好在k层中,就称为缓存命中(cache hit)。 终端用户访问加速节点时,如果该节点有缓存住了要被访问的数据时就叫做命中,如果没有的话需要回原服务器取,就是没有命中。 取数据的过程与用户访问是同步进行的,所以即使是...
分类:
其他好文 时间:
2015-05-12 22:27:46
阅读次数:
150
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
skip-external-locking
log-error=/usr/local/mysql/log/error.log
key_buffer_size=5G
max_allowed_packet=50M
table_open_cache=4000
sort_buffer_size=2M
net_buffer_length=8K
read_..
分类:
数据库 时间:
2015-05-12 19:09:21
阅读次数:
186
在学习cache过程中,看到枚举类来指定cache或cacheManager的状态,记录下来
public final class More ...Status implements Serializable {
public static final Status STATUS_UNINITIALISED = new Status(0, "STATUS_UNINITIALISED")...
分类:
其他好文 时间:
2015-05-12 11:30:15
阅读次数:
113
if (HttpContext.Current.Cache["code_" + CodeType] == null){ SysCodeService codeService = new SysCodeService(); List allCode = codeService.GetCodeLis.....
分类:
Web程序 时间:
2015-05-12 11:04:02
阅读次数:
132
在nginx配置文件中:upstreamwebservers{
server192.168.1.6weight=1max_fails=2fail_timeout=2;
}
proxy_cache_path/data/nginx/cache/webserverlevels=1:2keys_zone=webserver:20mmax_size=1g;
location/{
proxy_passhttp://webservers;
proxy_set_headerX-Real-IP$remote_..
分类:
其他好文 时间:
2015-05-12 01:53:17
阅读次数:
176
如何下载rpm包到本地设置yum安装时,保留rpm包。1.编辑 /etc/yum.conf 将keepcache的值设置为1;这样就可以将yum安装时的rpm包保存在 /var/cache/yum下面2.或者使用yum-plugin-downloadonly插件, sudo yum install ...
分类:
系统相关 时间:
2015-05-11 23:29:35
阅读次数:
278
本文要以一个例子来说明SpringMVC访问静态资源 /images /**映射到 ResourceHttpRequestHandler 进行处理,location指定静态资源的位置.可以是web application根目录下、jar包里面,这样可以把静态资源压缩到jar包中。cache-period可以使得静态资源进行web cache 如果出现下面的错误,可能是没有配置 的原因。 报错...
分类:
编程语言 时间:
2015-05-11 20:07:04
阅读次数:
296
1.删除0字节文件find-typef-size0-execrm-rf{}\;2.查看进程按内存从大到小排列ps-e-o"%C:%p:%z:%a"|sort-k5-nr3.按cpu利用率从大到小排列ps-e-o"%C:%p:%z:%a"|sort-nr4.打印说cache里的URLgrep-r-ajpg/data/cache/*|strings|grep"http:"|awk-F‘http:‘‘{print"http:"$2;}‘5.查看..
分类:
系统相关 时间:
2015-05-11 18:19:23
阅读次数:
160
在nginx配置nginx.conf中http{upstreamwebservers{ server192.168.1.26weight=1max_fails=2fail_timeout=2;}proxy_cache_path/data/nginx/cache/webserverlevels=1:2keys_zone=webserver:20mmax_size=1g;server{add_headerX-Via$server_addr; add_headerX-Cache$upstream_cache..
分类:
其他好文 时间:
2015-05-11 18:13:15
阅读次数:
158
什么是代理服务器?
代理服务器英文全称是(Proxy Server),其功能就是代理网络用户去取得网络信息。形象的说:它是网络信息的中转站。代理服务器就好象一个大的Cache,这样就能显著提高浏览速度和效率。更重要的是:Proxy Server(代理服务器)是Internet链路级网关所提供的一种重要的安全功能,主要的功能有:
1. 突破自身IP访问限制,访问国外站点www.google....
分类:
其他好文 时间:
2015-05-11 17:59:31
阅读次数:
177