You are not logged in.
Pages: 1
Hallo Ab,
I can't find TSynCache.Add()
In Mormot 1 exist
Offline
Because in mormot 2 there is a new R/W locking mechanism which is more effecient when reading from multiple threads.
So the purpose of the class is to be .... a cache. And for a cache you only need AddOrUpdate / not Add.
If you want something more complete, don't use TSynCache but just TSynDictionary or IKeyValue<> from mormot.Core.collections.
Offline
My purpose is for caching, I will change to AddOrUpdate. Thx u
But maybe little correction for Find() documentation, still written call Add()
/// find a Key in the cache entries
// - return '' if nothing found: you may call Add() just after to insert
// the expected value in the cache
Offline
Pages: 1