Wednesday, April 9, 2008

PHP header work with Squid cache server

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

对于动态页面,则可以直接通过写入HTTP返回的头信息,比如对于新闻首页index.php可以是20分钟,而对于具体的一条新闻页面可能是1天后过期。比如:在php中加入了1个月后过期:

// Expires one month later
header("Expires: " .gmdate ("D, d M Y H:i:s", time() + 3600 * 24 * 30). " GMT");

New theme for blog life!

Get k2 theme yestoday, very cool, google adsense is not on my new theme now. new theme, new life.

yeah, update for this post, I choise Binary Moon wordcodess theme. I think it's better than K2 ;)

Tuesday, April 8, 2008

ntp server list

pool.ntp.org

awk url

http://www.grymoire.com/Unix/Awk.html

用grep 的时候可能很慢,是因为使用了utf-8系统环境语言变量,换成C或者en_US就好了,在gzip的使用也可能会遇到类似问题~

Sunday, April 6, 2008

Squid freenode helper!

hi guys, How to control the cache's life time by urls? such as, if I visit the url "http://example.com/book/123?delcache", my squid will delete the cache of "http://example.com/book/123" web page.
id_sonic: write a helper app to do it
ie, a snippet of perl that when it sees a URL suffixed fixed with ?delcache, will drop that from the cache
oh, thanks. I will try the helper .

Tuesday, March 25, 2008

Alive again!

Hi, this blog alive again. Host on RHEL4, Apache 2.2.8, PHP 5.2.5.