Dynamic Cache
A complete in-memory cache in Flutter. It works either by retrieving the instance from anywhere in your business logic, or by context through a provider and an extension.
Features
- Wrapper
DynamicCacheProvideris for the injection of the cache on context for use in the three. Dynamic Cachecan be used both directly with widgets, but preferably in business rule, with a suitable state manager.Automaticcache cleaning, with the possibility of setting a time expiration for each item.DynamicCachecan be used as a singleton, or as a class instance.- Control notify listeners when the cache is updated.
Usage DynamicCache
First, you need to import the package:
import 'package:dynamic_cache/dynamic_cache.dart';
For complete example, check the example section.
Libraries
- dynamic_cache
- The library export package.
- sources/dynamic_cache
- sources/dynamic_cache_provider