Solved

Apache Caching Problem

Posted on 2007-04-05
3
246 Views
Last Modified: 2010-04-20
Howdy folks, I have a problem with apache caching. We are developing Flash applications so theres a lot of testing, changing, re-compiling, loading going on. Apache keeps caching these flash files so any changes we make arent visible as apache is obviously loading an older cached version of the same file.

I have solved this problem many months ago but we have had the hard drive with the apache config file on stolen and i cant remember the directive value for the life of me.

I know this is a case of loading the apache 'cache' module in apache and setting a directive (i assume 'CachDisable') . I want to disable caching accross all sites... so globably (we have many virtual hosts set up) but im not sure of the directive. I'm thinking its something along the lines of 'CacheDisable All' but im not even too sure where in the config file it should go.

Any help would be great and thanks in advance.
0
Comment
Question by:Damon_E
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:samri
ID: 18858441
hi Damon E,

i had the impression that the content is cached on the browser, and not on the server.

anyway, it would be possible to force apache to sent the "instruction" across in the HTTP_HEADER, so that the content is not cache.

I searched thru Apache docs website, and came across two modules that may sound workable for your situation -- mod_expire and mod_cache.

http://httpd.apache.org/docs/2.0/mod/mod_expires.html
This module controls the setting of the Expires  HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.

These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

To modify Cache-Control directives other than max-age (see RFC 2616 section 14.9), you can use the Header directive.

or look at :

http://httpd.apache.org/docs/2.0/mod/mod_cache.html
http://httpd.apache.org/docs/2.0/mod/mod_headers.html


I just think that there are better options -- but give the standard setup a try.

Alternately, you could do hold the shift key while clicking on refresh button on the browser.  This would cause the web browser (i think most browser) would fetch a fresh copy from the server instead of local cache.

some external links that may look promising:
http://forums.powweb.com/showthread.php?p=409306
http://www.websiteoptimization.com/speed/tweak/cache/

HTH.
cheers.
0
 

Author Comment

by:Damon_E
ID: 18858598
Sorry In my haste to get this resolved i sacrificed thinking. Please disregard the 'Apache Caching' jazz, I'm mixing it up with 'flex server' (which does cache flash files server side) so I'll start again....

Yes, I do mean the expiration of local chached files and I'm very aware of HTTP header so sorry for the confusion. The solution i'm looking for is simply what 'value' to use with the 'CachDisable' directive of the 'mod_cache' module that will simply disable all caching for all sites. In the httpd.conf It's something along the lines of...

LoadModule cache_module modules/mod_cache.so
CacheDisable All

Its the 'All' im not too sure of and where in the config file i should put the directive to affect all sites (all virtual hosts). The documentation only mentions values specific to a directory you want to disable caching for and not what value to use if you want to disable it for all directories.

Cheers.
0
 
LVL 15

Accepted Solution

by:
samri earned 500 total points
ID: 18859143
Hi Damon E,

no problem at all mate!

We are all (at least I am), are just another support guy/gal that looks for ways to get things working.

since you had practically solved your own problem, you may recommed to PAQed this Question -- since I think the option that you had chosen is workable.

alternately, you could rate the comment appropriately -- in which I think just something I put down to try sorting the issue out.

cheers.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question