For starters let me just throw it out there that I know the code below is not thread safe (correction: might be). What I am struggling with is finding an implementation that
Just uploaded sample library to address issue for .Net 2.0.
Take a look on this repo:
RedisLazyCache
I'm using Redis cache but it also failover or just Memorycache if Connectionstring is missing.
It's based on LazyCache library that guarantees single execution of callback for write in an event of multi threading trying to load and save data specially if the callback are very expensive to execute.