Hey Spider,
Are you sure you are wrong?
What version of squid are you using?
What is the result for the same request when you use "curl" or "wget"?
In order to cache the request you are talking about there is a need to
make sure that the request and the response do support caching and allow
them.
There are many cases which there is a need for the file to not be cached
by the server request or by the client request and squid obeys them.
We can determine it manually by looking at the request and response or
maybe you can even try the tool redbot:
http://redbot.org/
It is very simple to use.
Feel free to just ask about the subject.
Eliezer
On 06/01/14 04:30, spiderslack wrote:
Hi all
I am setting up a proxy with squid and realized that he is not a cache,
or my understanding is incorrect examine me follow my setup.
visible_hostname galileu
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged)
machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl manager url_regex -i ^cache_object:///squid-internal-mgr/
acl localhost src 192.168.1.0/24
http_access allow manager localhost
http_access deny manager
http_access allow localhost manager
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128
cache_dir ufs /var/squid/cache/squid 1000 16 256
coredump_dir /var/squid/cache/squid
cache allow all
the command "cache allow all" was just to test but still did not work
I try to access a site with static content where the html and simple
thing like "<h1> test </ h1>" but does not work
In the log,in the logs I see only TCP_MISS not TCP_HIT this is correct?
according to the official website of squuid
http://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_result_codes
TCP_MISS: The response object delivered was the network response object.
TCP_HIT: The response object delivered was the local cache object.
1388784386.986 130 192.168.1.112 TCP_MISS/200 399 GET
http://xxxx/~leandro/test.html - HIER_DIRECT/xxx.xxx.xxx.xxx text/html
1388784387.105 65 192.168.1.112 TCP_MISS/200 399 GET
http://xxxx/~leandro/test.html - HIER_DIRECT/xxx.xxx.xxx.xxx text/html
1388784387.278 84 192.168.1.112 TCP_MISS/200 399 GET
http://xxxx/~leandro/test.html - HIER_DIRECT/xxx.xxx.xxx.xxx text/html
any idea where I am going wrong?