CacheConfigurationModel constructor
const
CacheConfigurationModel({
- required String name,
- int maxCacheSize = CacheConstants.defaultMaxDiskCacheSize,
- int maxCacheEntries = CacheConstants.defaultMaxCacheEntries,
- Duration defaultTtl = CacheConstants.defaultCacheTtl,
- CacheExpirationPolicy expirationPolicy = CacheExpirationPolicy.ttl,
- CacheStorageLevel storageLevel = CacheStorageLevel.multiLevel,
- CacheFileType fileType = CacheFileType.general,
- bool autoCleanupEnabled = true,
- double cleanupThreshold = CacheConstants.cacheCleanupThreshold,
- double cleanupTargetRatio = CacheConstants.cacheCleanupTargetRatio,
- Duration cleanupInterval = CacheConstants.cacheCleanupInterval,
- bool wifiOnlyMode = false,
- int maxConcurrentDownloads = CacheConstants.defaultMaxConcurrentDownloads,
- Duration networkTimeout = CacheConstants.defaultNetworkTimeout,
- Duration downloadTimeout = CacheConstants.defaultDownloadTimeout,
- int retryAttempts = CacheConstants.defaultRetryAttempts,
- Duration retryDelay = CacheConstants.defaultRetryDelay,
- bool enabled = true,
- bool debugMode = false,
- String? customCacheDirectory,
- Map<
String, String> customHeaders = const <String, String>{}, - CachePriority priority = CachePriority.normal,
- bool validateIntegrity = true,
- bool enableCompression = false,
- bool enableEncryption = false,
- Map<
String, Object?> metadata = const <String, Object?>{},
Constructor for CacheConfigurationModel
Implementation
const CacheConfigurationModel({
required this.name,
this.maxCacheSize = CacheConstants.defaultMaxDiskCacheSize,
this.maxCacheEntries = CacheConstants.defaultMaxCacheEntries,
this.defaultTtl = CacheConstants.defaultCacheTtl,
this.expirationPolicy = CacheExpirationPolicy.ttl,
this.storageLevel = CacheStorageLevel.multiLevel,
this.fileType = CacheFileType.general,
this.autoCleanupEnabled = true,
this.cleanupThreshold = CacheConstants.cacheCleanupThreshold,
this.cleanupTargetRatio = CacheConstants.cacheCleanupTargetRatio,
this.cleanupInterval = CacheConstants.cacheCleanupInterval,
this.wifiOnlyMode = false,
this.maxConcurrentDownloads = CacheConstants.defaultMaxConcurrentDownloads,
this.networkTimeout = CacheConstants.defaultNetworkTimeout,
this.downloadTimeout = CacheConstants.defaultDownloadTimeout,
this.retryAttempts = CacheConstants.defaultRetryAttempts,
this.retryDelay = CacheConstants.defaultRetryDelay,
this.enabled = true,
this.debugMode = false,
this.customCacheDirectory,
this.customHeaders = const <String, String>{},
this.priority = CachePriority.normal,
this.validateIntegrity = true,
this.enableCompression = false,
this.enableEncryption = false,
this.metadata = const <String, Object?>{},
});