SlidingWindowCache provides a local sliding window cache, which is mainly used to cache data organized in a certain sequence, such as time series data.The size of the load data window and the size of the cache data window can be configured.
SlidingWindowCache is compliant with the .NET standard and supports cross-platform use.
varconfig=newSlidingWindowConfig<long>{PerLoadSize=newTimeSpan(0,2,0).Ticks,StartPoint=newDateTime(2019,1,1).Ticks,EndPoint=newDateTime(2019,2,1).Ticks,TotalLoadSize=newTimeSpan(0,30,0).Ticks,TotalCacheSize=newTimeSpan(7,0,0).Ticks};varcache=newSlidingWindowCache<long,DataModel>(config){DataSourceDelegate=DataModel.Instance.LoadDataFromSource,CurrentPoint=config.StartPoint};vardata=awaitcache.GetCacheData(newDateTime(2019,1,1,0,1,0).Ticks,newDateTime(2019,1,1,0,2,0).Ticks,
t =>t.Point);For more information, please check SlidingWindowCache.ConsoleApp.
- Configuration
- PerLoadSize
- TotalLoadSize
- TotalCacheSize
- ForwardAndBackwardScale
- Automatic completion
- Pre-cache data
- Automatically remove data