public Task <T> ReadAsync <T>(string path, CancellationToken cancellationToken = default) { return(_memoryCache.GetOrCreateAsync( path, entry => { entry.SlidingExpiration = TimeSpan.FromSeconds(_appConfiguration.CacheDurationSec); return _decoratedJsonDataSource.ReadAsync <T>(path, cancellationToken); })); }
public Task <IEnumerable <LicenseType> > GetAsync() { return(_jsonDataSource.ReadAsync <IEnumerable <LicenseType> >( Path.Join(Dir, FilePath))); }
public Task <IEnumerable <LocalString> > GetAsync() { return(_jsonDataSource.ReadAsync <IEnumerable <LocalString> >( Path.Join(Dir, FilePath))); }