X-Cache和X-Pad

本文解释了HTTP请求中X-Cache头部字段的意义,包括MISS和HIT的状态,以及X-Pad的由来,它与古老的netscape bug有关。
X-Cache: 表示你的 http request 是由 proxy server 回的
MISS 表 proxy 無資料,代理動作, HIT 表 proxy 直接回應

X-Pad: 這個是800 年前的 netscape  bug 的因素才用的 
 
gapinyc@DESKTOP-9QS7RL5:~/superset-prod$ export DOCKER_BUILDKIT=1 docker compose up --build -d [+] Running 18/18 ✔ nginx Pulled 19.7s ✔ e2d0ea5d3690 Pull complete 2.3s ✔ 621a51978ed7 Pull complete 7.7s ✔ 03e63548f209 Pull complete 5.0s ✔ f80aba050ead Pull complete 16.4s ✔ 76c9bcaa4163 Pull complete 18.7s ✔ 83ce83cd9960 Pull complete 13.2s ✔ 2d35ebdb57d9 Pull complete 16.3s ✔ 7fb80c2f28bc Pull complete 18.5s ✔ redis Pulled 44.8s ✔ 491cac7f2e45 Pull complete 21.0s ✔ f637881d1138 Pull complete 24.5s ✔ 7f2a16ba242b Pull complete 43.7s ✔ 4f4fb700ef54 Pull complete 0.0s ✔ 39cb007b6d10 Pull complete 29.3s ✔ 516a54ddb544 Pull complete 35.2s ✔ 3881684f3863 Pull complete 31.9s ✔ fcf08622f74c Pull complete 26.6s [+] Building 654.7s (18/23) => [internal] load local bake definitions 0.0s => => reading from stdin 531B 0.0s => [internal] load build definition from Dockerfile.superset 0.0s => => transferring dockerfile: 4.60kB 0.0s => [internal] load metadata for docker.io/apache/superset:5.0.0 0.4s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => CACHED [base-image 1/7] FROM docker.io/apache/superset:5.0.0@sha256:09735adaae3945c5a8fabbeca31a7954c8c74de195702ba61622aee8604d5c55 0.0s => => resolve docker.io/apache/superset:5.0.0@sha256:09735adaae3945c5a8fabbeca31a7954c8c74de195702ba61622aee8604d5c55 0.0s => [internal] load build context 0.2s => => transferring context: 467.46kB 0.2s => CACHED [stage-2 2/6] RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone 0.0s => CACHED [stage-2 3/6] RUN rm -rf /app/superset/superset/static/dist 0.0s => [base-image 2/7] RUN echo "deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && echo "deb https://mirrors.aliyun.co 0.3s => [base-image 3/7] RUN apt-get update && apt-get install -y --no-install-recommends build-essential libssl-dev libffi-dev python 302.5s => [base-image 4/7] RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource-keyring.gpg 0.9s => [base-image 5/7] RUN echo "deb [signed-by=/usr/share/keyrings/nodesource-keyring.gpg] https://deb.nodesource.com/node_18.x bookworm main" > /etc/apt/sources.list.d/ 0.3s => [base-image 6/7] RUN apt-get update && apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/* 188.0s => [base-image 7/7] RUN node --version && npm --version 0.7s => [frontend-builder 1/6] WORKDIR /app/superset-frontend 0.2s => [frontend-builder 2/6] COPY ./superset-5.0.0/superset-frontend/ . 0.5s => [frontend-builder 3/6] RUN npm config set registry https://registry.npmmirror.com && npm config set cache /tmp/npm-cache && mkdir -p /tmp/npm-cache 0.9s => ERROR [frontend-builder 4/6] RUN --mount=type=cache,id=npm-node-modules,target=/app/superset-frontend/node_modules --mount=type=cache,id=npm-cache,target=/tmp 159.7s ------ > [frontend-builder 4/6] RUN --mount=type=cache,id=npm-node-modules,target=/app/superset-frontend/node_modules --mount=type=cache,id=npm-cache,target=/tmp/npm-cache npm ci: 3.694 npm WARN EBADENGINE Unsupported engine { 3.694 npm WARN EBADENGINE package: 'superset@5.0.0', 3.694 npm WARN EBADENGINE required: { node: '^20.16.0', npm: '^10.8.1' }, 3.694 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.694 npm WARN EBADENGINE } 3.707 npm WARN EBADENGINE Unsupported engine { 3.707 npm WARN EBADENGINE package: 'rimraf@6.0.1', 3.707 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.707 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.707 npm WARN EBADENGINE } 3.707 npm WARN EBADENGINE Unsupported engine { 3.707 npm WARN EBADENGINE package: 'glob@11.0.1', 3.707 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.707 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.707 npm WARN EBADENGINE } 3.708 npm WARN EBADENGINE Unsupported engine { 3.708 npm WARN EBADENGINE package: 'jackspeak@4.0.2', 3.708 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.708 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.708 npm WARN EBADENGINE } 3.709 npm WARN EBADENGINE Unsupported engine { 3.709 npm WARN EBADENGINE package: 'lru-cache@11.0.2', 3.709 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.709 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.709 npm WARN EBADENGINE } 3.709 npm WARN EBADENGINE Unsupported engine { 3.710 npm WARN EBADENGINE package: 'minimatch@10.0.1', 3.710 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.710 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.710 npm WARN EBADENGINE } 3.710 npm WARN EBADENGINE Unsupported engine { 3.710 npm WARN EBADENGINE package: 'path-scurry@2.0.0', 3.710 npm WARN EBADENGINE required: { node: '20 || >=22' }, 3.710 npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' } 3.710 npm WARN EBADENGINE } 11.33 npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. 11.64 npm WARN deprecated viewport-mercator-project@7.0.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. 12.01 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated 13.52 npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated 13.66 npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated 14.29 npm WARN deprecated topojson@1.6.27: Use topojson-client, topojson-server or topojson-simplify directly. 14.35 npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added 14.39 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated 14.40 npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 15.08 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 17.60 npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info. 19.52 npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() 21.22 npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. 21.82 npm WARN deprecated har-validator@5.1.5: this library is no longer supported 22.32 npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported 24.52 npm WARN deprecated domexception@1.0.1: Use your platform's native DOMException instead 33.78 npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead 38.46 npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. 44.49 npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead 45.66 npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead 47.22 npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. 47.61 npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. 47.61 npm WARN deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. 47.62 npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. 47.89 npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. 50.61 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported 50.90 npm WARN deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported 51.30 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported 52.30 npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. 53.38 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported 54.75 npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead 55.88 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported 56.49 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported 58.88 npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported 159.5 npm ERR! code 1 159.5 npm ERR! path /app/superset-frontend/node_modules/puppeteer 159.5 npm ERR! command failed 159.5 npm ERR! command sh -c node install.mjs 159.5 npm ERR! Error: ERROR: Failed to set up Chrome v127.0.6533.88! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. 159.5 npm ERR! at file:///app/superset-frontend/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:58:23 159.5 npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 159.5 npm ERR! at async Promise.all (index 0) 159.5 npm ERR! at async downloadBrowser (file:///app/superset-frontend/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:90:9) { 159.5 npm ERR! [cause]: Error: connect ECONNREFUSED 142.251.33.91:443 159.5 npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1549:16) { 159.5 npm ERR! errno: -111, 159.5 npm ERR! code: 'ECONNREFUSED', 159.5 npm ERR! syscall: 'connect', 159.5 npm ERR! address: '142.251.33.91', 159.5 npm ERR! port: 443 159.5 npm ERR! } 159.5 npm ERR! } 159.5 159.5 npm ERR! A complete log of this run can be found in: 159.5 npm ERR! /tmp/npm-cache/_logs/2025-10-22T09_20_01_459Z-debug-0.log ------ Dockerfile.superset:86 -------------------- 85 | # 使用缓存安装依赖(需 DOCKER_BUILDKIT=1) 86 | >>> RUN --mount=type=cache,id=npm-node-modules,target=/app/superset-frontend/node_modules \ 87 | >>> --mount=type=cache,id=npm-cache,target=/tmp/npm-cache \ 88 | >>> npm ci 89 | -------------------- failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1 gapinyc@DESKTOP-9QS7RL5:~/superset-prod$
最新发布
10-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值