rem: cachePtr->hPtr = Tcl_CreateHashEntry(&cachesTable, name, &new);
add: cachePtr->hPtr = Tcl_CreateHashEntry(&caches, name, &new); if (!new) { Cache *prevPtr;  Ns_Log(Warning, "cache: duplicate cache name: %s", name); prevPtr = Tcl_GetHashValue(cachePtr->hPtr); prevPtr->hPtr = NULL; }
context: CacheCreate(char *name, int keys, time_t timeout, size_t maxSize,	    Ns_Callback *freeProc){    Cache *cachePtr;    int new;    cachePtr = ns_calloc(1, sizeof(Cache) + strlen(name));    cachePtr->freeProc = freeProc;    cachePtr->timeout = timeout;    cachePtr->maxSize = maxSize;    cachePtr->currentSize = 0;    cachePtr->keys = keys;    strcpy(cachePtr->name, name);    cachePtr->nflush = cachePtr->nhit = cachePtr->nmiss = 0;    Ns_MutexSetName2(&cachePtr->lock, "nscache", name);    Tcl_InitHashTable(&cachePtr->entriesTable, keys);    if (timeout > 0) {    	cachePtr->schedId = Ns_ScheduleProc(NsCachePurge, cachePtr, 0, timeout);    } else {    	cachePtr->schedId = -1;    }    cachePtr->schedStop = 0;    Ns_MutexLock(&lock);    if (!initialized) {    	Ns_MutexSetName2(&lock, "ns", "cache");    	Tcl_InitHashTable(&cachesTable, TCL_STRING_KEYS);	initialized = 1;    }    cachePtr->hPtr = Tcl_CreateHashEntry(&cachesTable, name, &new);    Tcl_SetHashValue(cachePtr->hPtr, cachePtr);    Ns_MutexUnlock(&lock);    return (Ns_Cache *) cachePtr;}