add asserts
reduce critical section size in AbstractCacheHelper and AbstractDiskCache