cachePolicyForPath method

CachePolicy? cachePolicyForPath(
  1. String path
)

Returns the CachePolicy for path.

Evaluates each policy added by addCachePolicy against the path and returns it if exists.

Implementation

CachePolicy? cachePolicyForPath(String path) {
  return _policyPairs
      .firstWhereOrNull((pair) => pair.shouldApplyToPath(path))
      ?.policy;
}