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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user