停止Apache服务器的缓存 [英] Stop an Apache Server from Caching

查看:107
本文介绍了停止Apache服务器的缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何停止我的(本地主机)Apache Server缓存任何内容.缓存是对现场站点的良好优化,但是在调试服务器端代码时却毫不减轻.

此外,有人对调试cgi有更好的主意吗?我已经开发了一个小DLL和一个宏

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

CGI_DBG_BREAK()


宏在DLL中调用一个文件名为Argument的函数,该函数检查文件名是否在断点列表上.如果是,它将在宏内调用中断3.

每个cgi,例如"My.cgi"旁边还有一个附加的二进制文件:"My.cgi.bpt",其中包含执行断点的文件列表.

然后有一个小型Windows应用程序,用于从其中包含的列表中添加和删除文件.后一个应用程序带有命令行参数,因此我可以直接从工具"菜单中使用它来编辑断点.因此,可以通过按CPP文件基础"激活或禁用断点

一切正常.但是,它也非常复杂,我觉得应该有一个更简单的方法.


问候,

Bram van Kampen :)


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 :)

推荐答案

一些想法/评论:
1.您确定是Apache进行缓存的吗?浏览器往往是非常激进的缓存器.从Ctrl-F5(或您的浏览器使用的任何形式)中击败#
A few ideas/comments:
1. Are you sure it''s Apache doing the caching? Browsers tend to be very aggressive cachers. Beating the #


%^似乎是必不可少的事情.
2.确保mod_cache已从您的Apache配置中排除(我假设您可以控制自己的开发机.)
3.您使用什么语言编写cgi?可能会设置一个开关,以便Apache在调试/单步模式下启动您的解释器/应用程序.从此处开始 ://httpd.apache.org/docs/2.2/howto/cgi.html"target =" _ blank> ^ ]
4. Apache中还可以做更多的事情,例如设置缓存控制标头来告诉浏览器不要缓存响应. (请参阅上面的1.)

嚼很多东西,如果您有启发,请发表评论.

干杯,
彼得
%^ 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


这篇关于停止Apache服务器的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆