m2014-architecture-imgserver->Lighttpd Mod_Cache很简单很强大的动态缓存
2014-06-30 16:26
423 查看
Lighttpd是一个德国人领导的开源软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点.
mod_cache是lighttpd的一个插件,类似于nginx的proxy+cache提供反向代理及cache服务,其安装配置非常简单:
下载: http://code.google.com/p/lighttpd-improved/downloads/list
安装:
#./configure
#make
#make install
将doc目录下的配置文件拷贝至相应的目录
配置:
server.modules = (
# ...., other modules
"mod_cache",
"mod_proxy" )//顺序一定是mod_cache在mod_proxy之前
cache.enable = "enable" //开启缓存
cache.bases=("/servers/lighttpd/cache","/data/cache")//缓存目录,可以配置多个
cache.support-queries="enable"//开启url参数解析,即根据不同的参数缓存为不同的页面
cache.dynamic-mode="enable"
cache.refresh-pattern = (//缓存规则,必须配置,否则缓存无效
".(?i)jsp$" => "1"
)
proxy.server = ( ".jsp" =>
( "localhost" =>
(
"host" => "192.168.56.201",
"port" => 8080
)
)
)
这时再通过lighttpd访问tomcat所有的jsp页面都会被缓存,并且index.jsp?id=1和index.jsp?id=2是不同的缓存结果
mod_cache是lighttpd的一个插件,类似于nginx的proxy+cache提供反向代理及cache服务,其安装配置非常简单:
下载: http://code.google.com/p/lighttpd-improved/downloads/list
安装:
#./configure
#make
#make install
将doc目录下的配置文件拷贝至相应的目录
配置:
server.modules = (
# ...., other modules
"mod_cache",
"mod_proxy" )//顺序一定是mod_cache在mod_proxy之前
cache.enable = "enable" //开启缓存
cache.bases=("/servers/lighttpd/cache","/data/cache")//缓存目录,可以配置多个
cache.support-queries="enable"//开启url参数解析,即根据不同的参数缓存为不同的页面
cache.dynamic-mode="enable"
cache.refresh-pattern = (//缓存规则,必须配置,否则缓存无效
".(?i)jsp$" => "1"
)
proxy.server = ( ".jsp" =>
( "localhost" =>
(
"host" => "192.168.56.201",
"port" => 8080
)
)
)
这时再通过lighttpd访问tomcat所有的jsp页面都会被缓存,并且index.jsp?id=1和index.jsp?id=2是不同的缓存结果
相关文章推荐
- m2014-architecture-imgserver->Lighttpd +mod_mem_cache的效果简直太好了
- m2014-architecture-imgserver->配置lighttpd mod_mem_cache 模块做静态资源服务器
- m2014-architecture-imgserver->利用Squid反向代理搭建CDN缓存服务器加快Web访问速度
- Oracle 11g 的server结果缓存result_cache_mode
- 利用Header机制隐掉Vary,提高mod_cache缓存的命中率
- 使用 WebSphere Application Server 动态缓存技术提升应用性能
- 解决用<img src="<%# Eval("ShowPhoto")%>"动态绑定图片,发布到IIS上无法显示的问题
- <iOS>ASIHTTPRequest和ASIDownloadCache实现本地缓存
- apache利用mod_cache缓存图片等
- [简单易懂]VideoCacheView使用解析,强大的视频缓存类
- lighttpd + modcache (本人从来不觉得nginx有传说中那么夸张) 推荐
- 设置meta标签 清除页面缓存,如:<meta http-equiv="Cache-Control" content="no-cache"/>
- <img src="img/captcha.php?nocache=<?php echo time(); ?>
- Simple server side cache for Express with Node.js——Express 实现简单的服务器端缓存【翻译】
- 强大的Android图片下载缓存库——Picasso<一>
- [CVE-2014-2324] [5.0]Lighttpd mod_evhost与mod_simple_vhost 路径回溯漏洞
- 使用apache的mod_disk_cache做缓存,不能缓存开启了session的php页面
- squid缓存动态文件及cache-control参数
- 解决用<img src="<%# Eval("ShowPhoto")%>"动态绑定图片,发布到IIS上无法显示的问题
- thinkphp 中的cache缓存机制更是强大