分享

写回答

发帖

[提问] linux godaddy 怎么设置缓存 ?

GoDaddy GoDaddy 1687 人阅读 | 3 人回复

发表于 2010-9-30 19:31:04 | 显示全部楼层 |阅读模式

我设置的缓存无效
<ifmodule mod_headers.c>

# htm,html,txt类的文件缓存一个小时
<filesmatch "\.(html|htm|txt)$">

header set cache-control "max-age=3600"
</filesmatch>

# css, js, swf类的文件缓存一个星期
<filesmatch "\.(css|js|swf)$">
header set cache-control "max-age=604800"
</filesmatch>


# jpg,gif,jpeg,png,ico,flv,pdf等文件缓存一年
<filesmatch "\.(ico|gif|jpg|jpeg|png|flv|pdf)$">
header set cache-control "max-age=29030400"
</filesmatch>

</ifmodule>

回答|共 3 个

wwwcn.org

发表于 2011-3-12 14:30:18 | 显示全部楼层

我也没有解决这问题

add.c

发表于 2011-3-12 14:54:02 | 显示全部楼层

回复 2# 的帖子

把你的.htaccess发出来看看

tpxp

发表于 2011-3-12 16:28:30 | 显示全部楼层

这么弄
很麻烦
直接设置缓存在数据库里或者在硬盘上
您需要登录后才可以回帖 登录 | 注册

本版积分规则