[squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX - But anyway - until I PURGED by the squidclient the required page - it was in the STALE state in the log - TCP_REFRESH_HIT - and I saw the old data. Could anyone please give a clue how to make a certain URL REGEX to be non-cacheable and to make a direct request always to a origin server, even if the object is already cached? Regards, Anton.
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
Just realized that i have reload_into_ims on this was making me to be not able to refresh the given page or site, since refresh request was changed - but anyway - it should not affect no_cache? On Thursday 16 October 2008 14:28, Anton wrote: BTW Squid 2.6STABLE20 - TPROXY2 On Thursday 16 October 2008 13:49, Anton wrote: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX - But anyway - until I PURGED by the squidclient the required page - it was in the STALE state in the log - TCP_REFRESH_HIT - and I saw the old data. Could anyone please give a clue how to make a certain URL REGEX to be non-cacheable and to make a direct request always to a origin server, even if the object is already cached? Regards, Anton.
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
On tor, 2008-10-16 at 13:49 +0500, Anton wrote: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX This only matches the exact URL of root page of the server, not any other objects on that web server (including any inlined objects or stylesheets). What you probably want is: acl DIRECTNIX dstdomain www.nix.ru no_cache deny DIRECTNIX which matches the whole site. always_direct is unrelated to caching. But if you want Squid to bypass any peers you may have (cache_peer) then it's the right directive. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
On tor, 2008-10-16 at 14:34 +0500, Anton wrote: Just realized that i have reload_into_ims on this was making me to be not able to refresh the given page or site, since refresh request was changed - but anyway - it should not affect no_cache? It doesn't. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
Anton escreveu: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX your ACL is too complicated for a pretty simple thing ... it has the 'begin with' flag (^) and has the 'end with' ($) flag as well. And it has a final slash too. So, it seems that would match exclusively http://www.nix.ru/ and nothing else . including NOT matching 'http://www.nix.ru/index.htm', 'http://www.nix.ru/logo.jpg' and so on. if you wanna hints on doing regexps, i would give you a precious hint: don't try to complicate things. acl DIRECTNIX url_regex -i www\.nix\.ru would do the job and would be much simplier to understand. And NEVER forget the case inconditional (-i) flag on regex -- Atenciosamente / Sincerily, Leonardo Rodrigues Solutti Tecnologia http://www.solutti.com.br Minha armadilha de SPAM, NÃO mandem email [EMAIL PROTECTED] My SPAMTRAP, do not email it
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
Thanks so much Henrick and Leonardo! Looks I should learn regexes, since taked $ as the whatever after meaning but not end of string :) Now it logs as TCP_MISS. Thanks so much again! On Thursday 16 October 2008 15:45, Leonardo Rodrigues Magalhães wrote: Anton escreveu: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX your ACL is too complicated for a pretty simple thing ... it has the 'begin with' flag (^) and has the 'end with' ($) flag as well. And it has a final slash too. So, it seems that would match exclusively http://www.nix.ru/ and nothing else . including NOT matching 'http://www.nix.ru/index.htm', 'http://www.nix.ru/logo.jpg' and so on. if you wanna hints on doing regexps, i would give you a precious hint: don't try to complicate things. acl DIRECTNIX url_regex -i www\.nix\.ru would do the job and would be much simplier to understand. And NEVER forget the case inconditional (-i) flag on regex
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
BTW Squid 2.6STABLE20 - TPROXY2 On Thursday 16 October 2008 13:49, Anton wrote: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX - But anyway - until I PURGED by the squidclient the required page - it was in the STALE state in the log - TCP_REFRESH_HIT - and I saw the old data. Could anyone please give a clue how to make a certain URL REGEX to be non-cacheable and to make a direct request always to a origin server, even if the object is already cached? Regards, Anton.
Re: [squid-users] Unable to have certain site to be non-cacheable and ignore already cached data
Thanks so much Henrick and Leonardo! Looks I should learn regexes, since taked $ as the whatever after meaning but not end of string :) Now it logs as TCP_MISS. Thanks so much again! If you are needing to match just the domain its better to use 'dstdomain' ACL type instead of regex. Squid processes them much faster and can still do wildcard sub-domains (.nix.ru). Amos On Thursday 16 October 2008 15:45, Leonardo Rodrigues Magalhães wrote: Anton escreveu: Hello! was trying for a few hours to have a certain site (http://www.nix.ru) to be not cacheable - but squid always gives me an object which is in cache! My steps: acl DIRECTNIX url_regex ^http://www.nix.ru/$ no_cache deny DIRECTNIX always_direct allow DIRECTNIX your ACL is too complicated for a pretty simple thing ... it has the 'begin with' flag (^) and has the 'end with' ($) flag as well. And it has a final slash too. So, it seems that would match exclusively http://www.nix.ru/ and nothing else . including NOT matching 'http://www.nix.ru/index.htm', 'http://www.nix.ru/logo.jpg' and so on. if you wanna hints on doing regexps, i would give you a precious hint: don't try to complicate things. acl DIRECTNIX url_regex -i www\.nix\.ru would do the job and would be much simplier to understand. And NEVER forget the case inconditional (-i) flag on regex