Solved

Apache Caching Problem

Posted on 2007-04-05
3
242 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
  • 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

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now