Repository navigation
Description
version: trafficserver-7.0.0-rc2
testing URL: curl -v http://test.com:65432/data/1.php
first try:
################### cache.config #####################
dest_domain=test.com suffix=php action=never-cache cache-responses-to-cookies=0 #1
dest_domain=test.com suffix=jsp action=never-cache cache-responses-to-cookies=0 #2
dest_domain=test.com suffix=asp action=never-cache cache-responses-to-cookies=0 #3
dest_domain=test.com suffix=aspx action=never-cache cache-responses-to-cookies=0 #4
dest_domain=test.com suffix=ts ttl-in-cache=3s cache-responses-to-cookies=1 #5
dest_domain=test.com suffix=m3u8 ttl-in-cache=2s cache-responses-to-cookies=1 #6
dest_domain=test.com ttl-in-cache=4s cache-responses-to-cookies=0 #7
################### traffic.out #####################
[Jan 17 11:45:44.038] Server {0x2b309a30d700} DEBUG: <CacheControl.cc:466 (UpdateMatch)> (cache_control) Matched with for NEVER_CACHE at line 1 [cache-responses-to-cookies=0]
[Jan 17 11:45:44.038] Server {0x2b309a30d700} DEBUG: <CacheControl.cc:466 (UpdateMatch)> (cache_control) Matched with for TTL_IN_CACHE at line 7 [cache-responses-to-cookies=0]
##################### problem #######################
I expected rule #1, but rule #7 took effect.
second try:
################### cache.config #####################
dest_domain=test.com ttl-in-cache=4s cache-responses-to-cookies=0 #1
dest_domain=test.com suffix=php action=never-cache cache-responses-to-cookies=0 #2
dest_domain=test.com suffix=jsp action=never-cache cache-responses-to-cookies=0 #3
dest_domain=test.com suffix=asp action=never-cache cache-responses-to-cookies=0 #4
dest_domain=test.com suffix=aspx action=never-cache cache-responses-to-cookies=0 #5
dest_domain=test.com suffix=ts ttl-in-cache=3s cache-responses-to-cookies=1 #6
dest_domain=test.com suffix=m3u8 ttl-in-cache=2s cache-responses-to-cookies=1 #7
################### traffic.out #####################
[Jan 17 12:01:44.553] Server {0x2b521db00700} DEBUG: <CacheControl.cc:466 (UpdateMatch)> (cache_control) Matched with for TTL_IN_CACHE at line 1 [cache-responses-to-cookies=0]
##################### problem #######################
I expected rule #2, but rule #1 took effect.
Activity
garfieldonly commentedon Mar 21, 2019
According to the codes, it seems that the ttl-in-cache has higher priority than never-cache.
Actually,ats has an another bug here, sometimes ttl-in-cache doest not override new-cache,
rob05c commentedon Apr 12, 2021
This is working as documented: https://docs.trafficserver.apache.org/en/7.1.x/admin-guide/files/cache.config.en.html#matching-multiple-rules
And we can't change the current behavior, or we'd break people.
I think we all agree the behavior is highly unintuitive. We're planning to rewrite all configs in YAML. When we rewrite cache.config in YAML, we should make that design not additive, or somehow more intuitive.
rob05c commentedon Apr 12, 2021
See #7701
I recommend closing this issue in favor of #7701
bryancall commentedon Apr 12, 2021
Closing based on @rob05c comment.