Re: [squid-users] a miss threshold for certian times of a specified webpages

From: Amos Jeffries <>
Date: Mon, 02 Jul 2012 12:29:50 +1200

On 02.07.2012 10:24, Mustafa Raji wrote:
> --- On Sun, 7/1/12, Amos Jeffries wrote:
>> From: Amos Jeffries
>> On 1/07/2012 1:04 a.m., Mustafa Raji
>> wrote:
>> > hello
>> >
>> > is there an option that limits number of access to
>> webpage before it can be consider as a cachable and caches
>> the webpage
>> > example
>> > some option like a ( miss threshold ) = 30
>> > so the user requests the page for a 30 time and this
>> requests of the objects can by consider as a miss requests,
>> after the user request reaches this threshold (30), then
>> squid can consider this webpage objects as a cachable 
>> objects and began to cache these objects
>> Uhm, why are you even considering this?  What benefit
>> can you gain by wasting bandwidth and server CPU time?
>> HTTP servers send out Cache-Control details specifying
>> whether and for how long each object can be cached for.
>> Replacing these controls (which are often carefully chosen
>> by the webmaster) with arbitrary other algorithms like the
>> one you suggest is where all the trouble people have with
>> proxies comes from.
>> Amos
> thanks Amos for your reply
> what about an option that can consider the first 60 http requests for
> google webpage as a miss, and after the 60 requests the google
> webpage
> can be allowed to be cached, is there any option in squid to do this,
> of course without time limitation

No because HTTP is stateless protocol where each requests MUST be
considered in isolation from every other request. Squid can handle tens
of thousands of URL per second, each URL being up to 64KB line with
multiple letters at each byte position. Keeping counters for every
unique URL received by Squid over an unlimited time period would be as
bad or worse than simply caching in accordance with HTTP design

Which is why I asked; Why do you think this is a good idea? what are
you getting out of it? what possible use would outweigh all the wasted

NP: the google webpage (any of them including the front page) changes
dynamically, with different displays depending on user browser headers,
Cookies and on Geo-IP based information. Storing when not told to is a
*bad* idea. Discarding when told storage is possible is a waste of

Received on Mon Jul 02 2012 - 00:29:53 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 02 2012 - 12:00:02 MDT