toJson method
Implementation
@override
Object toJson() => {
if (cacheBypassRequestHeaderNames.isNotDefault)
'cacheBypassRequestHeaderNames': cacheBypassRequestHeaderNames,
'cacheKeyPolicy': ?cacheKeyPolicy?.toJson(),
'cacheMode': ?cacheMode,
'clientTtl': ?clientTtl?.toJson(),
'defaultTtl': ?defaultTtl?.toJson(),
'maxTtl': ?maxTtl?.toJson(),
'negativeCaching': ?negativeCaching,
if (negativeCachingPolicy.isNotDefault)
'negativeCachingPolicy': [
for (final i in negativeCachingPolicy) i.toJson(),
],
'requestCoalescing': ?requestCoalescing,
'serveWhileStale': ?serveWhileStale?.toJson(),
};