Jeck - Potential fix to issue 109, issue 112. Looks hopeful so far, please confirm (or confirm failure).

* We only want to record misses when the file doesn't exist. Item can be null if we're out of memory for whatever reason, resulting in an invalid miss.
This commit is contained in:
wagic.jeck
2009-10-22 09:33:16 +00:00
parent 1c62c0450a
commit 4dc217edcb

View File

@@ -1109,12 +1109,14 @@ cacheItem * WCache<cacheItem, cacheActual>::Get(int id, string filename, int sty
cacheItem * item = AttemptNew(filename,submode);
if(style == RETRIEVE_MANAGE){
managed[lookup] = item; //Record a hit or miss.
if(mError == CACHE_ERROR_404 || item)
managed[lookup] = item; //Record a hit or miss.
if(item){
item->deadbolt(); //Make permanent.
}
}
else {
if(mError == CACHE_ERROR_404 || item)
cache[lookup] = item;
}