toJson method

Map<String, Object?> toJson()

What was declared, and nothing that was not.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
      if (maxAge != null) 'maxAge': maxAge,
      if (sMaxAge != null) 'sMaxAge': sMaxAge,
      if (staleWhileRevalidate != null) 'staleWhileRevalidate': staleWhileRevalidate,
      if (immutable.isNotEmpty) 'immutable': immutable,
      if (documents != 'no-cache') 'documents': documents,
      if (memoryCacheBytes != 16 * 1024 * 1024) 'memoryCacheMB': memoryCacheBytes / (1024 * 1024),
      if (!diskCache) 'diskCache': false,
    };