I have this code:
int pictureId=10;
string cacheKey = string.Format(ModelCacheEventConsumer.PICTURE_URL_MODEL_KEY, pictureId);
return _cacheManager.Get(cacheKey, () =>
{
var url = _pictureService.GetPictureUrl(pictureId, showDefaultPicture: false);
//little hack here. nulls aren't cacheable so set it to ""
if (url == null)
url = "";
return url;
});
What exactly this part of code means:"
() =>
{"
var url =...."
Does it mean that function, which returns URL, is executed for every row from cache? What is then return type - list?
URL of documentation of this syntax?