Search squid archive

RE: Hello, can 'squidclient' check if a file is cached in the squid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Amos,

Thanks for the reply!

The URL is like http://<FQND>/folder1/folder2/..../xxx.zip

If I use the ICP query by the per script it returned below:

UDP_HIT http://<FQND>/folder1/folder2/..../xxx.zip

But if I use below squidclient to request:
Squidclient -h localhost -p 80 -t 1 $URL

It return:

HTTP/1.0 405 Method Not Allowed
Date: Wed, 23 Jan 2013 08:09:09 GMT
Server: Apache/2.2.14 (Ubuntu)
Allow: 
Vary: Accept-Encoding
Content-Length: 464
Content-Type: text/html; charset=iso-8859-1
X-Pad: avoid browser bug
X-Cache: MISS from localhost
X-Cache-Lookup: NONE from localhost:80
Via: 1.0 localhost (squid/3.1.14)
Connection: close

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method TRACE is not allowed for the URL /cache/test/Hayabusa/7.0.A.0.768/f453be5366a66271422f26c0cb453dd8/APP-SW_HAYABUSA_GENERIC_USERDEBUG_7.0.A.0.768_1253-6298_S1-SW-TEST-DDAB-0001.zip.</p>
<hr>
<address>Apache/2.2.14 (Ubuntu) Server at androidswrepo.sonyericsson.net Port 80</address>
</body></html>


BRs,
Qingsheng.


-----Original Message-----
From: Amos Jeffries [mailto:squid3@xxxxxxxxxxxxx] 
Sent: Wednesday, January 23, 2013 4:01 PM
To: squid-users@xxxxxxxxxxxxxxx
Subject: Re:  Hello, can 'squidclient' check if a file is cached in the squid?

On 22/01/2013 10:30 p.m., He, Qingsheng 2 wrote:
> Hello,
>
> But I have tried that with below command:
> #Squidclient -t 1 -h <SquidServerDNS> -p 80 $url It return 'X-Cache: 
> MISS from localhost'.
>
> But actually the url file has been cached in the squid server.
> Is there something wrong with my usage?

Maybe yes, maybe no.

HTTP has gone long way past the point where 1 URL meant 1 object. These days there can be up to millions of different Vary: versions of
object(s) for each URL. Or maybe Squid had it cached, but was unable to use the cached version for some other reason. These are also why ICP which only tests the URL can be HIT and an actual fetch can be a MISS.

Are you able to supply the URL, or at least the entire (unedited) reply headers reported by squidclient?

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux