MatexDataProvider<T> constructor

MatexDataProvider<T>({
  1. String debugLabel = 'MatexDataProvider',
  2. Duration ttl = const Duration(days: 1),
})

Constructor for the data provider.

  • Parameters:
    • debugLabel: Optional label for debugging. Defaults to 'MatexDataProvider'.
    • ttl: Optional time to live duration for cache. Defaults to 1 day.

Implementation

MatexDataProvider({
  this.debugLabel = 'MatexDataProvider',
  this.ttl = const Duration(days: 1),
}) {
  modelCache = TCacheManager<T>(
    cleaningInterval: const Duration(days: 1),
    debugLabel: '${debugLabel}ModelCache',
  );
  jsonCache = TCacheManager<Map<String, dynamic>>(
    cleaningInterval: const Duration(days: 1),
    debugLabel: '${debugLabel}JsonCache',
  );
}