Apache Caching Problem

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.
Who is Participating?
samriConnect With a Mentor Commented:
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.

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.

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 :


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:

Damon_EAuthor Commented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.