WestWind wrote:
> Hi,
>
> I want to know how squid determine an HTTP request is cached or not,
> for example: an request(GET a.html) sent by browser 2 times with
> different cookie.
Every HTTP request made and every object fetched back contain a set of
headers. Several of these headers tell Squid and your browser whether
the request and reply are able to be cached, and for how long.
To see what is happening with a good explanation of things visit the
cacheability engine and enter the page you want to know about:
http://www.ircache.net/cgi-bin/cacheability.py
> for the 2nd time, will squid return the cached object create by 1st request?
If they were allowed to be stored AND if the 2nd request came in before
the rules dropped it out of cache again (made it stale).
> Different 'referer', 'user-agent' or anything else affect it ?
Only if the website server want them to.
> Can I do something to make squid return the cached object or just
> forward to backend server?
You may be able to make the back-end webserver send out proper controls
telling squid what to do with each object.
>
> Is there any docment talking about this detail?
http://www.mnot.net/cache_docs/
Amos
-- Please use Squid 2.7.STABLE3 or 3.0.STABLE7Received on Tue Jun 24 2008 - 07:07:46 MDT
This archive was generated by hypermail 2.2.0 : Tue Jun 24 2008 - 12:00:08 MDT