dynamic_cache 0.0.6
dynamic_cache: ^0.0.6 copied to clipboard
A complete in-memory cache in Flutter. Inspired by IMemoryCache (Microsoft.Extensions.Caching.Memory.) from C# .
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';