LazyCache prevent null items being added to cache

I have a method that will expire null items immediately, however I wanted to know if there w as better way to do this for all memory cache items instead of repeating the same code over and over output = _cache.GetOrAdd( "GetRecordUri" + 123, entry => { var record = internalGetRecordUri(); **if(record == null) //… Read More LazyCache prevent null items being added to cache