CacheInvalidationRule.fromJson constructor
CacheInvalidationRule.fromJson(
- Object? j
Implementation
factory CacheInvalidationRule.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return CacheInvalidationRule(
cacheTags: switch (json['cacheTags']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"cacheTags" is not a list'),
},
host: switch (json['host']) {
null => null,
Object $1 => decodeString($1),
},
path: switch (json['path']) {
null => null,
Object $1 => decodeString($1),
},
);
}