I had one confusion with store.log entries - Whenever a url is cached, does squid immediately write the object to disk and make a swapout entry in the store.log?
For my project I need to calculate MD5 hashes of url contents, for urls that are cached by squid. I was thinking of reading urls from store.log and querying them with my client. My client would then compute hash and store the results. Since I would make just one query for every cached url, I was assuming that the additional load might be less. Is there any other efficient way to achieve what I want to do?
With regards
Sai Teja Peddinti�
----- Original Message -----
From: Amos Jeffries <squid3_at_treenet.co.nz>
To: squid-users_at_squid-cache.org
Cc:
Sent: Friday, 6 January 2012 9:42 PM
Subject: Re: [squid-users] do store.log SWAPOUT entries indicate comprehensive list of cached urls?
On 7/01/2012 7:35 a.m., Saiteja Peddinti wrote:
> Hi,
> Store.log gives the list of cached urls which have been stored on disk. If I want the list of cached urls, can I just follow the SWAPOUT entries in the store.log?
cached ever, yes.
cached now, no.
If you want a comprehensive list of all things cached now use the cache manager "objects" and "vm_objects" reports.
>� Are there any urls which are cached by squid but are not indicated in the store.log with a SWAPOUT entry (i.e. is it possible that urls are cached in memory, but are not swapped to disk)?
Your first statement answers your second question. "which have been stored on disk"
>
> Similar to access.log, is it possible to pipe the store.log entries into a pipe and receive them on another listening process on the same host?
No store.log is a log for maintenance debugging of problems in the storage cache. Not a long term record.
> For my application, I want to get all urls currently added to cache by squid and obtain the url content from squid immediately (posing as a web client). Is it possible to achieve by piping the store.log entries?
No. It is possible to achieve using a custom access.log though. Add the header "Cache-Control: only-if-cached" to your agents requests, and do not log requests made by that agent to the log being used by it.
Oh, and why do you need to do this in the first place? it will cut your network performance in half.
Amos
Received on Sat Jan 07 2012 - 03:25:53 MST
This archive was generated by hypermail 2.2.0 : Sat Jan 07 2012 - 12:00:02 MST