MCPcopy Create free account
hub / github.com/breck7/scroll / httpGetUrlFromCache

Method httpGetUrlFromCache

external/.scrollLibs.js:23779–23788  ·  view source on GitHub ↗
(url, queryStringMap = {}, responseClass = WillowHTTPResponse)

Source from the content-addressed store, hash-verified

23777 return this
23778 }
23779 async httpGetUrlFromCache(url, queryStringMap = {}, responseClass = WillowHTTPResponse) {
23780 const cacheKey = url + JSON.stringify(queryStringMap)
23781 const cacheHit = this._getFromResponseCache(cacheKey)
23782 if (!cacheHit) {
23783 const res = await this.httpGetUrl(url, queryStringMap, responseClass)
23784 this._setInResponseCache(cacheKey, res)
23785 return res
23786 }
23787 return cacheHit
23788 }
23789 async httpGetUrlFromProxyCache(url) {
23790 const queryStringMap = {}
23791 queryStringMap.url = url

Callers 1

Calls 3

_getFromResponseCacheMethod · 0.95
httpGetUrlMethod · 0.95
_setInResponseCacheMethod · 0.95

Tested by

no test coverage detected