CacheControl constructor

CacheControl({
  1. Cacheability? cacheability,
  2. Revalidation? revalidation,
  3. Expiration? expiration,
  4. required Component child,
})

Implementation

factory CacheControl(
    {Cacheability? cacheability,
    Revalidation? revalidation,
    Expiration? expiration,
    required Component child}) {
  var cc = CacheControlBuilder(
      expiration: expiration,
      cacheability: cacheability,
      revalidation: revalidation);
  if (revalidation != null) {
    return _CacheControlWithRevalidation(child: child, cacheControl: cc);
  }

  return CacheControl._(cacheControl: cc, child: child);
}