initialize method
Initialize the cache manager
Implementation
Future<void> initialize({CacheConfig? config}) async {
_config = config ?? const CacheConfig();
if (_config.persistToDisk && !kIsWeb) {
try {
final cacheDir = Directory.systemTemp;
_cacheFile = File('${cacheDir.path}/flutter_scrapper_cache.json');
await _loadFromDisk();
} catch (e) {
if (kDebugMode) {
print('Cache initialization warning: $e');
}
}
}
}