Skip to content

Commit

Permalink
add method to request cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelvis committed Jul 12, 2023
1 parent b356680 commit 8fd2160
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/tsurlfilter/src/engine/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export class Engine {
matchRequest(request: Request, frameRule: NetworkRule | null = null): MatchingResult {
let cacheKey = `${request.url}#${request.sourceHostname}#${request.requestType}`;

if (request.method) {
cacheKey += `#${request.method}`;
}

/**
* Add frame url text to the key to avoid caching,
* because allowlist rules are not stored in the engine
Expand Down

0 comments on commit 8fd2160

Please sign in to comment.