DataCacheManager class

A manager for storing scraped data using data_cache_x

Constructors

DataCacheManager.new(DataCacheX _cache)
Creates a new DataCacheManager with the given cache

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clears all data from the cache
exportToJson(String filename) Future<String>
Exports data to a JSON file
getAllStructuredData() Future<List<Map<String, dynamic>>>
Gets all structured data from the cache
getData(String id) → dynamic
Gets data from the cache
getStructuredData(String id) Future
Gets structured data from the cache
getStructuredDataBySource(String source) Future<List<Map<String, dynamic>>>
Gets structured data by source
importFromJson(String source) Future<void>
Imports data from a JSON file or string
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeData(String id) Future<void>
Removes data from the cache
removeStructuredData(String id) Future<void>
Removes structured data from the cache
storeData(String id, dynamic data) Future<void>
Stores data in the cache
storeStructuredData(String id, String source, dynamic data) Future<void>
Stores structured data in the cache
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create({bool useDatabase = true}) Future<DataCacheManager>
Factory constructor to create a DataCacheManager