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
Solved

Apache Caching Problem

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS EC2 HTTP & HTTPS 2 44
see android hidden files 10 96
Accessing two networks from one PC 30 109
How do I make a bootable windows flash drive? 11 55
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

809 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