# {py:mod}`arelle.WebCache` ```{py:module} arelle.WebCache ``` ```{autodoc2-docstring} arelle.WebCache :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`WebCache ` - ```{autodoc2-docstring} arelle.WebCache.WebCache :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`proxyDirFmt ` - ```{autodoc2-docstring} arelle.WebCache.proxyDirFmt :summary: ``` * - {py:obj}`proxyTuple ` - ```{autodoc2-docstring} arelle.WebCache.proxyTuple :summary: ``` * - {py:obj}`lastModifiedTime ` - ```{autodoc2-docstring} arelle.WebCache.lastModifiedTime :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`addServerWebCache ` - ```{autodoc2-docstring} arelle.WebCache.addServerWebCache :summary: ``` * - {py:obj}`DIRECTORY_INDEX_FILE ` - ```{autodoc2-docstring} arelle.WebCache.DIRECTORY_INDEX_FILE :summary: ``` * - {py:obj}`FILE_LOCK_TIMEOUT ` - ```{autodoc2-docstring} arelle.WebCache.FILE_LOCK_TIMEOUT :summary: ``` * - {py:obj}`INF ` - ```{autodoc2-docstring} arelle.WebCache.INF :summary: ``` * - {py:obj}`RETRIEVAL_RETRY_COUNT ` - ```{autodoc2-docstring} arelle.WebCache.RETRIEVAL_RETRY_COUNT :summary: ``` * - {py:obj}`HTTP_USER_AGENT ` - ```{autodoc2-docstring} arelle.WebCache.HTTP_USER_AGENT :summary: ``` ```` ### API ````{py:data} addServerWebCache :canonical: arelle.WebCache.addServerWebCache :value: > None ```{autodoc2-docstring} arelle.WebCache.addServerWebCache ``` ```` ````{py:data} DIRECTORY_INDEX_FILE :canonical: arelle.WebCache.DIRECTORY_INDEX_FILE :value: > '!~DirectoryIndex~!' ```{autodoc2-docstring} arelle.WebCache.DIRECTORY_INDEX_FILE ``` ```` ````{py:data} FILE_LOCK_TIMEOUT :canonical: arelle.WebCache.FILE_LOCK_TIMEOUT :value: > 30 ```{autodoc2-docstring} arelle.WebCache.FILE_LOCK_TIMEOUT ``` ```` ````{py:data} INF :canonical: arelle.WebCache.INF :value: > 'float(...)' ```{autodoc2-docstring} arelle.WebCache.INF ``` ```` ````{py:data} RETRIEVAL_RETRY_COUNT :canonical: arelle.WebCache.RETRIEVAL_RETRY_COUNT :value: > 5 ```{autodoc2-docstring} arelle.WebCache.RETRIEVAL_RETRY_COUNT ``` ```` ````{py:data} HTTP_USER_AGENT :canonical: arelle.WebCache.HTTP_USER_AGENT :value: > 'format(...)' ```{autodoc2-docstring} arelle.WebCache.HTTP_USER_AGENT ``` ```` ````{py:function} proxyDirFmt(httpProxyTuple) :canonical: arelle.WebCache.proxyDirFmt ```{autodoc2-docstring} arelle.WebCache.proxyDirFmt ``` ```` ````{py:function} proxyTuple(url) :canonical: arelle.WebCache.proxyTuple ```{autodoc2-docstring} arelle.WebCache.proxyTuple ``` ```` ````{py:function} lastModifiedTime(headers) :canonical: arelle.WebCache.lastModifiedTime ```{autodoc2-docstring} arelle.WebCache.lastModifiedTime ``` ```` `````{py:class} WebCache(cntlr: arelle.Cntlr.Cntlr, httpProxyTuple: tuple[bool, str, str, str, str] | None) :canonical: arelle.WebCache.WebCache ```{autodoc2-docstring} arelle.WebCache.WebCache ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} arelle.WebCache.WebCache.__init__ ``` ````{py:attribute} default_timeout :canonical: arelle.WebCache.WebCache.default_timeout :value: > None ```{autodoc2-docstring} arelle.WebCache.WebCache.default_timeout ``` ```` ````{py:property} timeout :canonical: arelle.WebCache.WebCache.timeout ```{autodoc2-docstring} arelle.WebCache.WebCache.timeout ``` ```` ````{py:property} recheck :canonical: arelle.WebCache.WebCache.recheck ```{autodoc2-docstring} arelle.WebCache.WebCache.recheck ``` ```` ````{py:property} logDownloads :canonical: arelle.WebCache.WebCache.logDownloads ```{autodoc2-docstring} arelle.WebCache.WebCache.logDownloads ``` ```` ````{py:method} saveUrlCheckTimes() -> None :canonical: arelle.WebCache.WebCache.saveUrlCheckTimes ```{autodoc2-docstring} arelle.WebCache.WebCache.saveUrlCheckTimes ``` ```` ````{py:property} noCertificateCheck :canonical: arelle.WebCache.WebCache.noCertificateCheck ```{autodoc2-docstring} arelle.WebCache.WebCache.noCertificateCheck ``` ```` ````{py:property} httpUserAgent :canonical: arelle.WebCache.WebCache.httpUserAgent ```{autodoc2-docstring} arelle.WebCache.WebCache.httpUserAgent ``` ```` ````{py:property} httpsRedirect :canonical: arelle.WebCache.WebCache.httpsRedirect ```{autodoc2-docstring} arelle.WebCache.WebCache.httpsRedirect ``` ```` ````{py:method} redirectFallback(matchPattern: regex.Pattern, replaceFormat: str) :canonical: arelle.WebCache.WebCache.redirectFallback ```{autodoc2-docstring} arelle.WebCache.WebCache.redirectFallback ``` ```` ````{py:method} resetProxies(httpProxyTuple) :canonical: arelle.WebCache.WebCache.resetProxies ```{autodoc2-docstring} arelle.WebCache.WebCache.resetProxies ``` ```` ````{py:method} normalizeFilepath(filepath: str, url: str, cacheDir: str = None) -> str :canonical: arelle.WebCache.WebCache.normalizeFilepath ```{autodoc2-docstring} arelle.WebCache.WebCache.normalizeFilepath ``` ```` ````{py:method} normalizeUrl(url: str | None, base: str | None = None) -> typing.Any :canonical: arelle.WebCache.WebCache.normalizeUrl ```{autodoc2-docstring} arelle.WebCache.WebCache.normalizeUrl ``` ```` ````{py:method} encodeForFilename(pathpart) :canonical: arelle.WebCache.WebCache.encodeForFilename ```{autodoc2-docstring} arelle.WebCache.WebCache.encodeForFilename ``` ```` ````{py:method} _fallbackRedirect(url: str, originalFilepath: str) -> str :canonical: arelle.WebCache.WebCache._fallbackRedirect ```{autodoc2-docstring} arelle.WebCache.WebCache._fallbackRedirect ``` ```` ````{py:method} urlToCacheFilepath(url: str, cacheDir: str | None = None, useRedirectFallback: bool = True) -> str :canonical: arelle.WebCache.WebCache.urlToCacheFilepath ```{autodoc2-docstring} arelle.WebCache.WebCache.urlToCacheFilepath ``` ```` ````{py:method} cacheFilepathToUrl(cacheFilepath: str, cacheDir: str | None = None) -> str :canonical: arelle.WebCache.WebCache.cacheFilepathToUrl ```{autodoc2-docstring} arelle.WebCache.WebCache.cacheFilepathToUrl ``` ```` ````{py:method} getfilename(url: str | None, base: str | None = None, reload: bool = False, checkModifiedTime: bool = False, normalize: bool = False, filenameOnly: bool = False) -> str | None :canonical: arelle.WebCache.WebCache.getfilename ```{autodoc2-docstring} arelle.WebCache.WebCache.getfilename ``` ```` ````{py:method} _checkIfNewerOnWeb(url: str, filepath: str) -> bool :canonical: arelle.WebCache.WebCache._checkIfNewerOnWeb ```{autodoc2-docstring} arelle.WebCache.WebCache._checkIfNewerOnWeb ``` ```` ````{py:method} _getTimeString(timeValue: time.time) -> str :canonical: arelle.WebCache.WebCache._getTimeString :staticmethod: ```{autodoc2-docstring} arelle.WebCache.WebCache._getTimeString ``` ```` ````{py:method} _quotedUrl(url: str) -> str :canonical: arelle.WebCache.WebCache._quotedUrl :staticmethod: ```{autodoc2-docstring} arelle.WebCache.WebCache._quotedUrl ``` ```` ````{py:method} _getFileTimestamp(path: str) -> float :canonical: arelle.WebCache.WebCache._getFileTimestamp :staticmethod: ```{autodoc2-docstring} arelle.WebCache.WebCache._getFileTimestamp ``` ```` ````{py:method} _downloadFileWithLock(url: str, filepath: str, retrievingDueToRecheckInterval: bool = False, retryCount: int = 5) -> bool :canonical: arelle.WebCache.WebCache._downloadFileWithLock ```{autodoc2-docstring} arelle.WebCache.WebCache._downloadFileWithLock ``` ```` ````{py:method} _downloadFile(url: str, filepath: str, retrievingDueToRecheckInterval: bool = False, retryCount: int = 5) -> bool :canonical: arelle.WebCache.WebCache._downloadFile ```{autodoc2-docstring} arelle.WebCache.WebCache._downloadFile ``` ```` ````{py:method} internetRecheckFailedRecovery(url: str, err: str | Exception, timeNowStr: str) -> None :canonical: arelle.WebCache.WebCache.internetRecheckFailedRecovery ```{autodoc2-docstring} arelle.WebCache.WebCache.internetRecheckFailedRecovery ``` ```` ````{py:method} reportProgress(blockCount, blockSize, totalSize) :canonical: arelle.WebCache.WebCache.reportProgress ```{autodoc2-docstring} arelle.WebCache.WebCache.reportProgress ``` ```` ````{py:method} clear() :canonical: arelle.WebCache.WebCache.clear ```{autodoc2-docstring} arelle.WebCache.WebCache.clear ``` ```` ````{py:method} getheaders(url) :canonical: arelle.WebCache.WebCache.getheaders ```{autodoc2-docstring} arelle.WebCache.WebCache.getheaders ``` ```` ````{py:method} geturl(url) :canonical: arelle.WebCache.WebCache.geturl ```{autodoc2-docstring} arelle.WebCache.WebCache.geturl ``` ```` ````{py:method} retrieve(url, filename=None, filestream=None, reporthook=None, data=None) :canonical: arelle.WebCache.WebCache.retrieve ```{autodoc2-docstring} arelle.WebCache.WebCache.retrieve ``` ```` `````