Skip to content

Commit 7561922

Browse files
committed
Fixes Unique Job ID Calc within CachedHandler
Previously it included the sender in the ID, however it seems like devices such as Chrome have random properties in this for each run. Now it only caches based on the request data, tested locally using PR #283
1 parent c93a0f2 commit 7561922

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/bridge/wrappers/cached.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class HandlerJob<Req> extends Job<WrappedRequest<Req>> {
1616

1717
hashCode(): string {
1818
// Ensure deterministic stringification between two requests for the same
19-
// properties
20-
return stringify(this.data);
19+
// properties. Do not cache based on the sender since it changes every request.
20+
return stringify(this.req);
2121
}
2222
}
2323

0 commit comments

Comments
 (0)