我正在尝试让我的 UWSGI 应用程序的 ATS 缓存返回,该应用程序当前与 ATS 本身在同一台机器上运行。
我不明白为什么 ATS 总是将我的请求转发给 UWSGI 并且不缓存结果。我在从源代码编译的 ubuntu 14.04 上使用 ATS 5.1.1,并遵循此处描述的教程:http: //daemonkeeper.net/735/apache-trafficserver-the-better-web-cache/
使用 curl 发出测试请求,我总是在 Via 标头中收到这些诊断信息:
uScMsSf pSeN:t cCMi p sS
WHich 可以使用 traffic_via 解码为:
Proxy request results:
Request headers received from client: simple request (not conditional)
Result of Traffic Server cache lookup for URL: miss (a cache "MISS")
Response information received from origin server: served
Result of document write-to-cache: no cache write performed
Proxy operation result: served
Error codes (if any): no error
Operational results:
Tunnel info: no tunneling
Cache-type and cache-lookup cache result values: cache / cache miss (url not in cache)
ICP status: no icp
Parent proxy connection status: no parent proxy
Origin server connection status: connection opened successfully
有人可以帮我理解,为什么结果没有被缓存?
我的 remap.config:
map http://trafficserver_build:8080 http://127.0.0.1:8888
我的缓存配置:
url_regex=.* revalidate=10m
我的 storage.config(默认提供):
var/trafficserver 256M
日志请求状态:
/opt/ts/bin/traffic_logcat -f /opt/ts/var/log/trafficserver/squid.blog 1415307115.252 0 10.0.3.28 TCP_MISS/200 258 HEAD http://127.0.0.1:8888/ - DIRECT/127.0.0.1 text/html 1415307127.721 0 10.0.3.28 TCP_MISS/200 258 HEAD http://127.0.0.1:8888/ - DIRECT/127.0.0.1 text/html 1415307171.141 0 10.0.3.28 TCP_MISS/200 258 HEAD http://127.0.0.1:8888/ - DIRECT/127.0.0.1 text/html 1415307176.480 0 10.0.3.28 TCP_MISS/200 258 HEAD http://127.0.0.1:8888/ - DIRECT/127.0.0.1 text/html