免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3701 | 回复: 4
打印 上一主题 下一主题

[proxy] 请教:squid对稍大点的文件缓存不住[已解决] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-19 10:58 |只看该作者 |倒序浏览
windows平台下的squid。

情况如下:
对图片、js、css等可以缓存。但对于其他的一些文件如rar(一般大小在400k左右,或者更大一点)就缓存不住了。
请各位高手帮忙指点一下。
同样的配置文件,在Unix下是没有问题的。

配置文件如下:

  1. cache_dir coss c:/squid/cache/coss 5000 block-size=4096 max-size=262144 membufs=100
  2. coredump_dir c:/squid/cache/logs

  3. http_port 3189 accel vhost defaultsite=xxx.cache.com
  4. forwarded_for on


  5. cache_peer xxx.source.com parent 80 0 no-query originserver name=xxx
  6. cache_peer_domain xxx xxx.cache.com

  7. cache_mem 512 MB
  8. maximum_object_size_in_memory 2 MB
  9. memory_pools off
  10. #memory_pools_limit 3584 MB
  11. #cache_replacement_policy heap GDSF
  12. #memory_replacement_policy heap GDSF

  13. negative_ttl 30 second

  14. cache_log c:/squid/cache/logs/cache.log
  15. cache_access_log none
  16. cache_store_log none
  17. log_icp_queries off
  18. emulate_httpd_log on
  19. debug_options ALL, 1
  20. half_closed_clients off
  21. client_persistent_connections on
  22. persistent_request_timeout 15 seconds
  23. shutdown_lifetime 10 seconds
  24. visible_hostname cache.xxx.com
  25. client_db off

  26. cache_swap_high 80
  27. cache_swap_low 60
  28. maximum_object_size 10 MB

  29. refresh_pattern -i .html 1440 100% 129600 reload-into-ims
  30. refresh_pattern -i .shtml 1440 100% 129600 reload-into-ims
  31. refresh_pattern -i .hml 1440 100% 129600 reload-into-ims
  32. refresh_pattern -i .gif 99999999 99999999% 99999999 ignore-reload
  33. refresh_pattern -i .jpg 99999999 99999999% 99999999 ignore-reload
  34. refresh_pattern -i .rar 99999999 99999999% 99999999 ignore-reload
  35. refresh_pattern -i .swf 99999999 99999999% 99999999 ignore-reload
  36. refresh_pattern -i .png 99999999 99999999% 99999999 ignore-reload
  37. refresh_pattern -i .bmp 99999999 99999999% 99999999 ignore-reload
  38. refresh_pattern -i .js 1440 100% 129600 reload-into-ims

  39. acl all src 0.0.0.0/0.0.0.0
  40. acl rangeget req_header Range .*
  41. acl localhost src 127.0.0.1/255.255.255.255
  42. acl manager proto cache_object
  43. http_access deny rangeget
  44. http_access allow manager localhost
  45. http_access deny all

  46. acl PURGE method PURGE
  47. http_access allow PURGE localhost
  48. http_access deny PURGE
复制代码

[ 本帖最后由 kedy 于 2008-3-21 19:09 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-03-19 13:35 |只看该作者

回复 #1 kedy 的帖子

可以显式的设定 maximum_object_size 试试。

Description :
Defines maximum size for objects to be stored in the disk
Build Option :Default
Usage :maximum_object_size size
Default object_size :4096 KB

论坛徽章:
0
3 [报告]
发表于 2008-03-19 17:57 |只看该作者
原帖由 xufengnju 于 2008-3-19 13:35 发表
可以显式的设定 maximum_object_size 试试。

Description :
Defines maximum size for objects to be stored in the disk
Build Option :Default
Usage :maximum_object_size size
Default object_si ...


maximum_object_size 10 MB

这个已经设置了的,但就是无效。

论坛徽章:
0
4 [报告]
发表于 2008-03-19 18:15 |只看该作者
maximum_object_size调小一点看看。

论坛徽章:
0
5 [报告]
发表于 2008-03-21 19:09 |只看该作者
唉,我的榆木脑袋,没法说了。
不是缓存不住,是我点击下载,然后没下载完就直接停掉了,这样就缓存不住了。
如果下载完然后再看,就缓存住了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP