Re: [squid-users] Caching an application/json file

From: DjinnS <djinns_at_chninkel.net>
Date: Fri, 10 Sep 2010 14:16:09 +0200

Le 10/09/2010 12:58, Amos Jeffries a écrit :
> The recent data attached hints that IMS requests are likely to return
> a completely new object when a refresh check is performed. This may
> wipe out any stored record of age on every request.

Here the rest of the config file:

### ACLs
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl xXxXxXx src xXxXxXx
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 81 # http bis
acl Safe_ports port 82 # http bis
acl CONNECT method CONNECT

acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx
acl xXxXxXx dstdomain xXxXxXx

# exclude from cache
acl excludeURL url_regex \/imgs\/newsletter\/
acl excludeURL url_regex \/sitemap_news\.xml$
acl excludeURL url_regex \/membre\/

# - PURGE
acl PURGE method PURGE
http_access allow PURGE localhost
http_access deny PURGE

http_access allow manager xXxXxXx
http_access allow manager localhost
http_access deny manager
http_access deny SSL_ports
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
icp_access deny all
htcp_access deny all

### MODE
http_port 80 accel vhost

### peers
cache_peer xXxXxXx parent 80 0 no-query originserver weight=1
name=xXxXxXx login=PASS
cache_peer xXxXxXx parent 80 0 round-robin no-query originserver
weight=1 name=xXxXxXx login=PASS
cache_peer xXxXxXx parent 80 0 round-robin no-query originserver
weight=1 name=xXxXxXx login=PASS

no_cache deny excludeURL

cache_peer_access xXxXxXx allow xXxXxXx
cache_peer_access xXxXxXx allow xXxXxXx
cache_peer_access xXxXxXx allow xXxXxXx
cache_peer_access xXxXxXx allow xXxXxXx
cache_peer_access xXxXxXx allow xXxXxXx

### cache
cache_mem 10240 MB
cache_dir aufs xXxXxXx 40960 16 256

### object size in cache
maximum_object_size_in_memory 4096 KB
minimum_object_size 0 KB
maximum_object_size 32800 KB
minimum_expiry_time 30 seconds

### cache replacement policy
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LFUDA

### ip cache size
ipcache_size 32768
ipcache_low 90
ipcache_high 95

### fqdn cache size
fqdncache_size 32768

### LOGGIN
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
"%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log none
cache_store_log none

### HEADERS
via off
httpd_suppress_version_string on
visible_hostname cache-01
request_header_max_size 64 KB
reply_header_max_size 64 KB

# MANAGER
cachemgr_passwd xxxxxxxxxxxxxxxxxxxxxxxx all

### DIVERS
hierarchy_stoplist cgi-bin ?

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0

# oxalide - cache static
refresh_pattern -i \.gif$ 240 20% 240
refresh_pattern -i \.png$ 240 20% 240
refresh_pattern -i \.jpg$ 240 20% 240
refresh_pattern -i \.jpeg$ 240 20% 240
refresh_pattern -i \.ico$ 240 20% 240
refresh_pattern -i \.js$ 240 20% 240
refresh_pattern -i \.swf$ 240 20% 240
refresh_pattern -i \.xml$ 240 20% 240
refresh_pattern -i \.css$ 240 20% 240

refresh_pattern . 0 20% 4320

# ne pas cacher les erreurs
negative_ttl 0 seconds

icp_port 3130
forwarded_for off
coredump_dir /var/spool/squid

shutdown_lifetime 2 seconds
pipeline_prefetch on

Any idea ?

--
DjinnS
Received on Fri Sep 10 2010 - 12:16:17 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 10 2010 - 12:00:04 MDT