Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

How do I Stop my (localhost) Apache Server from caching anything. Caching is a good optimization for a live site, but an unmitigated nuisance when debugging Server Side Code.

Also, has anybody better idea's about debugging cgi's ? I've developed a small DLL, and a Macro
C++
CGI_DBG_BREAK()

The Macro calls a function with the File name as Argument, in the DLL, which checks if the File name is on a Break-point List. If it is, it calls an interrupt 3 inside the macro.

Each cgi, e.g. 'My.cgi' has an aditional binary beside it: 'My.cgi.bpt',which contains a list of files in which the break-point is acted upon.

There is then a small Windows App, to add and remove files from the list contained therein. This latter App, takes a Command Line Argument, so that I can use it straight from the Tools Menu to edit the breakpoints. So, Breakpoints can be Activated or Disabled op a 'Per CPP File Basis'

It all works. But, it is also very complicated, and I feel there should be an easier way.


Regards,

Bram van Kampen :)

Posted
Updated 19-Mar-11 16:20pm
v2
Comments
Abdul Quader Mamun 19-Mar-11 22:20pm    
Edited spelling.

1 solution

A few ideas/comments:
1. Are you sure it's Apache doing the caching? Browsers tend to be very aggressive cachers. Beating the #$%^ out of Ctrl-F5 (or whatever your browser uses) seems to be a necessary evil.
2. Make sure mod_cache is excluded from your Apache config (I presume you have control over your dev machine.)
3. What language are you writing your cgi's in? It may be possible to set a switch so Apache launches your interpreter/app in debug/single-step mode. Have a wander round the Apache howto's, starting here[^]
4. Lots more thing are possible in Apache, like setting cache control headers to tell the browser not to cache responses. (see 1 above.)

Chew on this lot and comment if you feel inspired.

Cheers,
Peter
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900