MCPcopy
hub / github.com/apify/crawlee / _cacheRequest

Method _cacheRequest

packages/core/src/storages/request_queue_v2.ts:95–108  ·  view source on GitHub ↗

* Caches information about request to beware of unneeded addRequest() calls.

(cacheKey: string, queueOperationInfo: RequestQueueOperationInfo)

Source from the content-addressed store, hash-verified

93 * Caches information about request to beware of unneeded addRequest() calls.
94 */
95 protected override _cacheRequest(cacheKey: string, queueOperationInfo: RequestQueueOperationInfo): void {
96 super._cacheRequest(cacheKey, queueOperationInfo);
97
98 this.requestCache.remove(queueOperationInfo.requestId);
99
100 this.requestCache.add(queueOperationInfo.requestId, {
101 id: queueOperationInfo.requestId,
102 isHandled: queueOperationInfo.wasAlreadyHandled,
103 uniqueKey: queueOperationInfo.uniqueKey,
104 forefront: queueOperationInfo.forefront,
105 hydrated: null,
106 lockExpiresAt: null,
107 });
108 }
109
110 /**
111 * @inheritDoc

Callers 6

_ensureHeadIsNonEmptyMethod · 0.95
_listHeadAndLockMethod · 0.95
addRequestFunction · 0.80
addRequestsFunction · 0.80
markRequestHandledFunction · 0.80
reclaimRequestFunction · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected