public async Task <UserPhoto> GetByUserIdAsync(int userId) { var token = _cacheManager.GetOrCreateToken(this.GetType(), userId); return(await _cacheManager.GetOrCreateAsync(token, async (cacheEntry) => await _userPhotoRepository.SelectByUserIdAsync(userId))); }