Simple Cache Mechanism
Concurrency

If you want to implement it thread-safe, you have also lock the whole transaction. For instance: store != null assumes that there is no item in cache. Imagine that after that check another thread added one. That would result in a cache where the same item is cached twice.

Conside to use a thread-safe collection (e.g. ConcurrentDictionary) instead of using locking.

.Net Framework already provides a thread-safe cache: MemoryCache.

I am not very familiar with the entity framework, but as far as I know is the DbContext not thread-safe. Therefore it is not a good idea to use a single instance of it in multithreaded environments.



Code Style


_merchantStores, _db and _cacheTime should be read-only.
Methods that return a Task should be called xxxAsync
The property setter in StoreCacheInformation should be private or at least internal. Otherview external code may modify the state of the cached items.
For many cached items, it is better to use a dictionary instead of list.