【发布时间】:2020-11-02 15:50:11
【问题描述】:
在Varnish 中,我们可以加载特定的配置文件并告诉 Varnish 使用它。
例如,一个 bash 脚本:
#!/bin/bash
# Generate a unique timestamp ID for this version of the VCL
TIME=$(date +%s)
# Load the file into memory
varnishadm vcl.load varnish_$TIME /etc/varnish/default.vcl
# Active this Varnish config
varnishadm vcl.use varnish_$TIME
运行:
$ ./varnishconf
VCL compiled.
VCL 'varnish_1604136350' now active
但是,如果default.vcl 包含其他 vcl 文件,不清楚vcl.use 是否也会使用这些包含文件的那个版本?
例如在default.vcl:
include "includes/backend.vcl";
backends.vcl 状态是否包含在该vcl.use 版本中?
varnish 是否包含来自 vcl.load 的依赖包含文件到 vcl.use 中?
【问题讨论】:
标签: varnish varnish-vcl