Django 웹 캐쉬 방지하기

Django 프레임웍에서 코드를 수정 후 웹에서 display 하면
캐쉬가 먹는다.
잦은 코드 수정을 하는 입장에서는 짜증나는 일이다.

아파치를 재시작하면 이 문제는 해결되지만 코드 수정 할 때마다 아파치를
재시작 할 수는 없는 노릇이다.

아파치 설정에서
MaxRequestsPerChild 1 로 설정해 주면 이 문제가 해결된다.

MaxRequestsPerChild는 클라이언트 프로세스가 생성된 후 몇개의 요청을
처리하고 나면 죽일 것인가를 설정 하는 옵션인데 자세한 건 아파치 문서를
참고

http://www.djangobook.com/en/1.0/chapter20/

Because mod_python caches loaded Python code, when deploying Django sites on mod_python you’ll need to restart Apache each time you make changes to your code. This can be a hassle, so here’s a quick trick to avoid it: just add MaxRequestsPerChild 1 to your config file to force Apache to reload everything for each request. But don’t do that on a production server, or we’ll revoke your Django privileges.

Posted by Tcher

2009/07/01 18:46 2009/07/01 18:46
Response
No Trackback , No Comment
RSS :
http://blog.inculab.net/rss/response/6

Trackback URL : http://blog.inculab.net/trackback/6

Leave a comment
[로그인][오픈아이디란?]

python links

The wxPython Linux Tutorial
window gui 개발
http://wiki.wxpython.org/index.cgi/AnotherTutorial

Posted by Tcher

2009/07/01 18:17 2009/07/01 18:17
Response
No Trackback , No Comment
RSS :
http://blog.inculab.net/rss/response/5

Trackback URL : http://blog.inculab.net/trackback/5

Leave a comment
[로그인][오픈아이디란?]

Trackback URL : http://blog.inculab.net/trackback/4

Leave a comment
[로그인][오픈아이디란?]

블로그 이미지

- Tcher

Notices

Site Stats

Total hits:
24425
Today:
55
Yesterday:
117