httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c
Date Thu, 07 Mar 2002 19:27:58 GMT
stoddard    02/03/07 11:27:58

  Modified:    modules/experimental mod_mem_cache.c
  Log:
  Track cache size as items are added to and removed from the cache
  
  Revision  Changes    Path
  1.24      +3 -0      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mod_mem_cache.c	7 Mar 2002 19:21:56 -0000	1.23
  +++ mod_mem_cache.c	7 Mar 2002 19:27:58 -0000	1.24
  @@ -331,6 +331,7 @@
       if (!tmp_obj) {
           apr_hash_set(sconf->cacheht, obj->key, strlen(obj->key), obj);
           sconf->object_cnt++;
  +        sconf->cache_size += len;
       }
       if (sconf->lock) {
           apr_thread_mutex_unlock(sconf->lock);
  @@ -408,6 +409,7 @@
           mem_cache_object_t *mobj = (mem_cache_object_t *) obj->vobj;
           apr_hash_set(sconf->cacheht, obj->key, strlen(obj->key), NULL);
           sconf->object_cnt--;
  +        sconf->cache_size -= mobj->m_len;
           if (mobj->refcount) {
               mobj->cleanup = 1;
           }
  @@ -508,6 +510,7 @@
           mem_cache_object_t *mobj = (mem_cache_object_t *) obj->vobj;
           apr_hash_set(sconf->cacheht, key, APR_HASH_KEY_STRING, NULL);
           sconf->object_cnt--;
  +        sconf->cache_size -= mobj->m_len;
           if (mobj->refcount) {
               mobj->cleanup = 1;
           }
  
  
  

Mime
View raw message