description property

String get description

Human-readable description of the policy.

Implementation

String get description {
  switch (this) {
    case CachePolicy.networkOnly:
      return 'Always fetch from network';
    case CachePolicy.cacheFirst:
      return 'Try cache first, fallback to network';
    case CachePolicy.networkFirst:
      return 'Try network first, fallback to cache';
    case CachePolicy.cacheOnly:
      return 'Only use cache, no network';
    case CachePolicy.staleWhileRevalidate:
      return 'Return cache immediately, update in background';
  }
}