How to replace specific objects in squid cache?
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact:
How to replace specific objects in squid cache?
hi fellows,
AoA
My Question is that how to replace small objects which are stored in squid cache... i.e I have open my web site under squid and it will save all objects to his own cache. Furtherly i need to change any of picture in my web site and i do change one of small JPG file from my web site. Now when i have open again my web site... there i look old one picture
I have wait 2 days kay shayed khudi replace ho jaye but its not...
now tell me how to replace this picture from squid cache ?
picture file name is image3.jpg .
best of luck.....
Rgds.
Asad Ali
AoA
My Question is that how to replace small objects which are stored in squid cache... i.e I have open my web site under squid and it will save all objects to his own cache. Furtherly i need to change any of picture in my web site and i do change one of small JPG file from my web site. Now when i have open again my web site... there i look old one picture
I have wait 2 days kay shayed khudi replace ho jaye but its not...
now tell me how to replace this picture from squid cache ?
picture file name is image3.jpg .
best of luck.....
Rgds.
Asad Ali
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Farrukh Ahmed
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact:
Re:
Dear LF,LinuxFreaK wrote:Dear asaddotcom,
Salam,
FYI, http://linux.cudeso.be/linuxdoc/squid.php
Best Regards.
AoA
I have not found my question's answer from this site... there is only a squid documention which i have allready know. please do read my question again and tell me suitable answer.
Rgds.
Asad Ali
-
- Naik
- Posts: 75
- Joined: Mon Oct 13, 2003 5:06 am
- Location: Karachi, Pakistan
- Contact:
Re: How to replace specific objects in squid cache?
Let me to tell you some facts first.asaddotcom wrote: My Question is that how to replace small objects which are stored in squid cache... i.e I have open my web site under squid and it will save all objects to his own cache. Furtherly i need to change any of picture in my web site and i do change one of small JPG file from my web site. Now when i have open again my web site... there i look old one picture
Squid is not such non-efficenit proxy with which you have to purge expired contents manually. It have its own mechanism to purge expired contents.
The situation you are facing is either due to your miss-configuration of squid or with same silly stuff with your ISP.
Several administartors of Pakistani ISP's configure their squids to cached dynamic contents and to "convert client no-cache or "reload'' requests into If-Modified-Since requests" which is violation of laws infact.
See reload_into_ims tag http://squid.visolve.com/squid/squid24s ... d_into_ims for more info.
So I suggest you to check your ISP first, might this problem is occuring from you ISP's cache. (browse without your own proxy to check this issue).
Now back to your question, How can I purge an object from my cache?
Squid does not allow you to purge objects unless it is configured with access controls in squid.conf. First you must add something like
acl PURGE method purge
acl localhost src 127.0.0.1
http_access allow purge localhost
http_access deny purge
The above only allows purge requests which come from the local host and denies all other purge requests.
To purge an object, you can use the client program:
squidclient -m PURGE http://www.cnn.com/
If the purge was successful, you will see a ``200 OK'' response:
HTTP/1.0 200 OK
Date: Thu, 17 Jul 2005 16:03:32 GMT
Server: Squid/2.4.1
If the object was not found in the cache, you will see a ``404 Not Found'' response:
HTTP/1.0 404 Not Found
Date: Thu, 17 Jul 2005 16:03:22 GMT
Server: Squid/2.4.1
I hope this will help you.
regards
Hamid Ashraf
compucated(at)msn(dot)com
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact:
Dear compucated
AoA,
Well i dont need to purge anything bcoz i got the solution now
after to update my web site and put there new images i have to restart my squid service once then i am able to see new images.
I have try it . and this method is working fine....
Allah Hafiz.
Rgds.
Asad Ali
AoA,
Well i dont need to purge anything bcoz i got the solution now
after to update my web site and put there new images i have to restart my squid service once then i am able to see new images.
I have try it . and this method is working fine....
Allah Hafiz.
Rgds.
Asad Ali
Last edited by asaddotcom on Sun Aug 28, 2005 3:22 pm, edited 1 time in total.
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear asaddotcom,
Salam,
Wow what a solution !! But in production Server you can not do this !!
Best Regards.
Salam,
Wow what a solution !! But in production Server you can not do this !!
Best Regards.
Farrukh Ahmed
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact:
Re:
Dear LF Sallam,LinuxFreaK wrote:Dear asaddotcom,
Salam,
Wow what a solution !! But in production Server you can not do this !!
Best Regards.
Then you can tell me the more reliable solution
Rgds.
Asad Ali
Re:
use refresh_pattern for .jpg or .whteverasaddotcom wrote:Dear LF Sallam,LinuxFreaK wrote:Dear asaddotcom,
Salam,
Wow what a solution !! But in production Server you can not do this !!
Best Regards.
Then you can tell me the more reliable solution
Rgds.
Asad Ali
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact:
Dear K.B Sallam,
I want to refresh only those pages who give there "dates", like www.bbcurdu.com. jang.com.pk etc.
how can i set refresh_pattern of it ?
best rgrds.
Asad Ali
I want to refresh only those pages who give there "dates", like www.bbcurdu.com. jang.com.pk etc.
how can i set refresh_pattern of it ?
best rgrds.
Asad Ali
stop using offline modeasaddotcom wrote:Dear K.B Sallam,
I want to refresh only those pages who give there "dates", like www.bbcurdu.com. jang.com.pk etc.
how can i set refresh_pattern of it ?
best rgrds.
Asad Ali
-
- Company Havaldaar Major
- Posts: 195
- Joined: Fri Feb 04, 2005 7:21 pm
- Location: Lahore, PK
- Contact: