invalidateUrl method
Removes a specific URL or all URLs matching a path prefix from the cache.
Implementation
@override
void invalidateUrl(String urlOrPrefix) {
final keysToRemove =
_cache.keys.where((key) => key.contains(urlOrPrefix)).toList();
keysToRemove.forEach(_removeKey);
if (keysToRemove.isNotEmpty) {
stats.invalidations++;
}
}