CacheControl constructor
const
CacheControl({
- List<
CacheControlDirective> directives = const <CacheControlDirective>[CacheControlDirective.private, CacheControlDirective.noTransform, CacheControlDirective.mustRevalidate, CacheControlDirective.staleWhileRevalidate, CacheControlDirective.staleIfError], - Duration maxAge = const Duration(seconds: 10),
- Duration staleAge = const Duration(minutes: 5),
- Duration staleIfErrorAge = const Duration(minutes: 10),
Implementation
const CacheControl({
this.directives = const <CacheControlDirective>[
CacheControlDirective.private,
CacheControlDirective.noTransform,
CacheControlDirective.mustRevalidate,
CacheControlDirective.staleWhileRevalidate,
CacheControlDirective.staleIfError,
],
this.maxAge = const Duration(seconds: 10),
this.staleAge = const Duration(minutes: 5),
this.staleIfErrorAge = const Duration(minutes: 10),
});