Пример #1
0
        /// <summary>
        /// This will never return null nor contain any null entries
        /// </summary>
        public async Task <NonNullImmutableList <Post> > Get()
        {
            if (_cache[_cacheKey] is NonNullImmutableList <Post> cachedData)
            {
                return(cachedData);
            }

            var liveData = await _singleFolderPostRetriever.Get();

            _cache[_cacheKey] = liveData;
            return(liveData);
        }
Пример #2
0
 public Task <NonNullImmutableList <Post> > GetAll()
 {
     return(_postRetriever.Get());
 }