Alastair Crabtree

Results 69 comments of Alastair Crabtree

Did you manage to update to LazyCache 2? Are you still having issues? Or can we close this?

Hey, thanks for this - useful info! Although LazyCache will already trap an exception in the Lazy evaluation and ensure it does not get cached, (which is validated in [this...

Exactly as you describe - if you allow someone to cache `null`, they cannot determine when doing a Get if the item was removed from the cache or if they...

Good point about being able to cache a null with the GetOrAdd methods, that is also inconsistent. As you say managing nulls is always imperfect in c#due to the language...

Yeah that all makes a lot of sense to me and would tidy things up - I would accept a PR based on those changes with supporting unit tests. Although...

I am still thinking about if, and how, LazyCache should support a delete everything feature. In the meantime I have added 2 ways of achieving the same thing without changes...

> > > @alastairtree Would it be possible for you to publish an update or some high level overview of what your plans are for this project? It'd be cool...

I have added a long comment detailing some of the challenges with this feature on the issue below which should help explain why it's not yet merged https://github.com/alastairtree/LazyCache/issues/67#issuecomment-696413932

Never use HttpContext object outside the context of the current http request - this is a general rule for asp.net to avoid memory leaks/odd behaviours, not just a lazy cache...

Without a fully detailed example it is hard to solve your particluar issue, but as long as the method whose results you want to cache first runs in the context...