From 1b62f09c249ae8b59968e3927515da1ce52c705a Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 20 Apr 2002 07:31:46 +0000 Subject: MDCACHEHITRATE git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@125 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cache.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 94e8edfc..03092a2f 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.19 2002/04/19 12:10:09 in2 Exp $ */ +/* $Id: cache.c,v 1.20 2002/04/20 07:31:46 in2 Exp $ */ #include #include #include @@ -1070,9 +1070,16 @@ int mdcacheopen(char *fpath) char *cpath; if( strncmp(fpath, "boards/", 7) && strncmp(fpath, "etc/", 4) ) return open(fpath, O_RDONLY); - + +#ifdef MDCACHEHITRATE + ++GLOBE[0]; +#endif if( (fd = open((cpath = cachepath(fpath)), O_RDONLY)) < 0 ) return updatemdcache(cpath, fpath); +#ifdef MDCACHEHITRATE + else + ++GLOBE[1]; +#endif return fd; } -- cgit v1.2.3