Hello, I am using Squid-3.1 in acceleration mode and trying to
accelerate mediawiki-1.20.2.
I am trying to get squd to cache mediawiki's pages. Here is my squid config
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 web_ports port 80
acl purge method PURGE
http_access allow manager localhost
http_access deny manager
http_access allow web_ports all
http_access allow purge localhost
http_access deny purge
http_access deny all
http_port 10.50.79.19:80 accel
defaultsite=ec2-54-228-113-248.eu-west-1.compute.amazonaws.com vhost
ignore-cc
cache_peer 127.0.0.1 parent 8080 0 no-query originserver round-robin
name=wiki
cache_dir aufs /var/spool/squid/cache 500 16 256
refresh_pattern -i ^http: 5 100% 1440 ignore-no-cache
mediawiki is configured to use squid
// Squid
$wgUseSquid = true;
$wgSquidServers = array('10.50.79.19');
$wgSquidServersNoPurge = array('127.0.0.1');
But I am getting on request to main page, which is dymaically generated by
mediawiki, this response headers:
Cache-Control |s-maxage=18000, must-revalidate, max-age=0|
Connection |close|
Content-Language |ru|
Content-Type |text/html; charset=UTF-8|
Date |Mon, 08 Apr 2013 11:24:07 GMT|
Last-Modified |Mon, 08 Apr 2013 10:43:40 GMT|
Server |Apache/2.2.24 (Amazon)|
Vary |Accept-Encoding,Cookie|
X-Cache |MISS from ip-10-50-79-19.eu-west-1.compute.internal|
X-Cache-Lookup |MISS from ip-10-50-79-19.eu-west-1.compute.internal:80|
X-Content-Type-Options |nosniff|
X-Powered-By |PHP/5.3.20|
via |1.0 ip-10-50-79-19.eu-west-1.compute.internal (squid/3.1.10)|
so we see, that squid return result not from cache, but from the apache
web server.
We see coresponding records in Apache logs when cache misses.
While request to static content, like picture files return this headers
Accept-Ranges |bytes|
Age |15438|
Connection |keep-alive|
Content-Length |10204|
Content-Type |text/css|
Date |Mon, 08 Apr 2013 07:06:50 GMT|
Etag |"227ef-27dc-4d9846436bc62"|
Last-Modified |Thu, 04 Apr 2013 08:02:27 GMT|
Server |Apache/2.2.24 (Amazon)|
X-Cache |HIT from ip-10-50-79-19.eu-west-1.compute.internal|
X-Cache-Lookup |HIT from ip-10-50-79-19.eu-west-1.compute.internal:80|
via |1.0 ip-10-50-79-19.eu-west-1.compute.internal (squid/3.1.10)|
and here we see, that squid return content from the cache.
What can be the cause of cache MISS on main page ?
How to get squid to actually cache mediawiki's article pages ?
Thanks.