hi,all I just install squid 3.1.14 on centos 5 , and it work at http accel mode, it can cache the reponse with right expires and age header.
but i found it can't cache the 404 status response (no any expires or age header), even i use the negative_ttl setting and delete all refresh_pattern. a sample config file here: ``````````````````````````````````````````````````````````````````````` acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 acl SSL_ports port 443 acl HTTP_ports port 80 acl CONNECT method CONNECT negative_ttl 300 seconds acl httpwebsite dstdomain web.test.com http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny to_localhost http_access allow HTTP_ports httpwebsite http_access deny all http_port 80 accel vhost visible_hostname cache.test.com unique_hostname cache.test.com always_direct allow httpwebsite cache_effective_user nobody cache_effective_group nobody hierarchy_stoplist ? cache_mem 128 MB cache_dir aufs /home/cache 1024 16 256 coredump_dir /home/cache #refresh_pattern . 0 20% 300 ignore-reload ``````````````````````````````````````````````````````````````````````` i check it over one day using debug message but found nothing, so i recompile squid adding some debug message, and found the cache has been store but the expires variable is set to -1 ... so it lead to clientProcessRequest2: !storeEntryValidToSend MISS log like this: first request ( no cache object ) 2011/07/21 16:40:56.668| StoreEntry::InvokeHandlers: checking client #0 2011/07/21 16:40:56.668| storeClientCopy2: returning because ENTRY_FWD_HDR_WAIT set 2011/07/21 16:40:56.668| ctx: enter level 0: 'xxxxxxxxx' 2011/07/21 16:40:56.668| haveParsedReplyHeaders: HTTP CODE: 404 2011/07/21 16:40:56.668| httpMaybeRemovePublic: HTTP CODE: 404 2011/07/21 16:40:56.668| storeGet: looking up 7422A1837529156D1D98B1B10AB87DE2 2011/07/21 16:40:56.668| storeGet: looking up 90A4D13F2204DBA06956DBCBB39C00E5 2011/07/21 16:40:56.668| negativeCache: expires:-1 2011/07/21 16:40:56.668| StoreEntry::hashInsert: Inserting Entry 0x9ff9cd8 key '7422A1837529156D1D98B1B10AB87DE2' 2011/07/21 16:40:56.668| ctx: exit level 0 second request ( found one cache but not valid... ) 2011/07/21 16:40:58.162| ClientHttpRequest::httpStart: NONE for 'xxxxxxxxx' 2011/07/21 16:40:58.162| clientStreamRead: Calling 1 with cbdata 0x9ff4c7c from node 0x9ff21e0 2011/07/21 16:40:58.162| storeGet: looking up 7422A1837529156D1D98B1B10AB87DE2 2011/07/21 16:40:58.162| validToSend: ENTRY_NEGCACHED: expires:-1 squid_curtime:1311237658 2011/07/21 16:40:58.162| clientProcessRequest2: !storeEntryValidToSend MISS 2011/07/21 16:40:58.162| clientProcessMiss: 'GET xxxxxxxxx' can someone help me to find out why the negative_ttl not work here ? or i has some mistakes in the config file? thanks a lot.... 2011-07-21 ssmax