Search squid archive

Re: Re: Squid Cache flush

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

 



Have you tested to see if any of these concerns are in fact something that can happen.

It is my understanding that Squid will ask the app server if the content is new or not and if the app server says that the text is new and the photo is old, then squid will ask for a new copy of the test and show the old photo.

http://wiki.squid-cache.org/SquidFaq/InnerWorkings#How_does_Squid_decide_when_to_refresh_a_cached_object.3F


Ron

On 25/04/2011 2:37 PM, Jawahar Balakrishnan (JB) wrote:
The problem is not refreshing content from the CMS. Our deployment
will be Squid reverse proxying an app server that in turn talks to the
CMS for the content and adds the look and feel to the content. So
squid will be caching the final url. the challenge is to figure out
how to get squid to be aware of any changes that might have happened
to any object in that page. If it is a few objects, it will be an easy
thing but when there are large scale changes - i would like to be able
to flush the cache without having to restart.

On Thu, Apr 21, 2011 at 8:24 PM, Ron Wheeler
<rwheeler@xxxxxxxxxxxxxxxxxxxxx>  wrote:
On 21/04/2011 5:29 PM, Ron Wheeler wrote:
On 21/04/2011 1:46 PM, Jawahar Balakrishnan (JB) wrote:
If you are thinking that is is dynamic content with query strings then
it's not the case. the urls will look like a directory structured
static content but the back-end app server will translate the url and
fetch the appropriate content from the CMS (alfresco)

Very few CMS or portals use query strings to select content.
Our portal does not.

What software are you using? Perhaps you can get some actual experience
from a current squid user.

You might get more help in the Alfresco forum.
There seems to be a specific Alfresco problem for which there seems to be a
solution.

http://forums.alfresco.com/en/viewtopic.php?t=11412


Ron

Have you tried a test with squid?

Ron
On Thu, Apr 21, 2011 at 1:30 PM, Ron Wheeler
<rwheeler@xxxxxxxxxxxxxxxxxxxxx>    wrote:
If you google "squid dynamic content" you will find that by default
squid
does not cache dynamic content.
If it did, it would be useless as a proxy server since that would make
almost all dynamic sites unusable.

There are lots of instructions about how to trick squid into caching
content
that it (and the web servers it proxies) think is dynamic but you know
is
not.
Youtube videos is one example where the web server says the content is
dynamic but in fact humans know that it is not.

I think that a simple test will allow you to see that your CMS content
will
get handled correctly.

What are you using for CMS servers?
Perhaps someone can give you first-hand experience or a web site to
visit.
I have never had to do anything to Apache and Wordpress to get it to
work
properly.

Don't forget that Squid and the web server can talk to each other
without
actually shipping content. The HTTP protocol has lots of different
messages
that can be quickly exchanged to make decisions about whether squid
actually
needs new content.


Ron


On 21/04/2011 12:31 PM, Jawahar Balakrishnan (JB) wrote:
It is all dynamic content going forward

scenarios where  a cache flush would be required

1) an article is updated
2) category  is updated with a list of articles.

we syndicate content to abut 150 partner and will have same
article/category with a different URL doesn't squid cache based on the
url?

when you update content on your cms - how does squid know to update
it's
cache?

JB

On Thu, Apr 21, 2011 at 12:10 PM, Ron Wheeler
<rwheeler@xxxxxxxxxxxxxxxxxxxxx>      wrote:
Are you sure that you need to do this?
Squid should be able to tell the difference between static and dynamic
content.

We have a dynamic JSR-168/268 portal based on Tomcat and Jetspeed
sitting
behind Apache and Squid  and we have never had to intervene with Squid
for 3
years.
We also have lots of Wordpress CMS sites.

The user gets the latest information on every page load regardless of
the
URL being the same.

What exactly would cause you to trigger a flush of the cache?

Ron


On 21/04/2011 11:30 AM, Jawahar Balakrishnan (JB) wrote:
I would rather not do a restart of anything unless absolutely
required

Here are the challenges we face

1) We are trying to deploy Suqid as a reverse-proxy in front of a CMS
2) We want to trying find a balance between  keeping the content
fresh
without affecting performance by frequently expiring content.

Our current reverse proxy solution allow us to flush the entire cache
without having to restart but in limited testing Squid seemed to
perform much better and we would prefer to use Squid but still retain
the functionality of being able to flush the entire cache
periodically
via cron or when in case of an emergency.

Cache-control headers are fine and will work in case of limited
number
of objects.

Thanks
JB


On Tue, Apr 19, 2011 at 7:27 PM, Amos Jeffries<squid3@xxxxxxxxxxxxx>
  wrote:
On Tue, 19 Apr 2011 11:14:55 -0400, Jawahar Balakrishnan (JB) wrote:
I am looking to deploy Squid as a reverse proxy and i had couple of
questions. We currrently use Bluecoat and Sun Web proxy and i am
able
to do the following things

1) How would i flush objects from cache?
The whole lot:
  http://wiki.squid-cache.org/SquidFaq/ClearingTheCache

or individually via:
  HTTP "PURGE" requests
  HTCP "CLR" requests

  squidpurge tool commands.


2) Can i flush the entire cache without restarting Squid?
Yes ... but it takes a LONG time to do N objects individually.
Restart without a cache to load takes milliseconds.

3) Can i set the configuration to expire objects at a certain time
every day regardless of when the object was cache during the
previous
24 hours?
Use of the Expiry and Cache-Control mechanisms properly can do just
about
anything. Correct use will make all proxies not just your reverse
one
handle
the site fine and remove a lot of customer problems.

Objects which arrive with header "Expires: XX" will expire at XX
timestamp
and be replaced on their next use.



Amos







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

  Powered by Linux