I am bit confused here with caching so thought to ask for an expertise.
I have Inserted HttpRuntime.Cache
I have 2 users via 2 different login, working on the same caching at the same time i.e., one user is clearing it and another one accessing it.
I have written below code while accessing caching.
if (HttpRuntime.Cache[MyKey] == null)
{
HttpRuntime.Cache.Insert(MyKey, CityCollection);
}
else
{
CityCollection = (List<CityDTO>)HttpRuntime.Cache[MyKey];
}
Will it give me an object reference for 2nd user? Or 2nd user will get collection form caching?
Or Does it work as per the request?