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