dart_frog_dependency_cacher library

Extensions

RequestContextAsync on RequestContext
Extension providing readAsync

Functions

futureProvider<T>(DependencyBuilder<T> create, {KeyFinder? keyFinder, bool shouldCache = true, bool cacheValid(T)?}) → Middleware
A Middleware that injects a dependency asynchronously and caches it for future use.

Typedefs

DependencyBuilder<T> = FutureOr<T> Function(RequestContext context, {String? key})
A function that creates a dependency.
KeyFinder = FutureOr<String?> Function(RequestContext context)
A function that finds a caching key given a context