enhanced TSQLRestCache.CachedEntries and TSQLRestCache.CachedMemory to be thread-safe