apache / apache/trafficserver

ATS 10.0.x, `*_HIT` always on event log. NO `TCP_MISS` with ttl-in-cache on cache.config at all

Open
#11,743 3 comments 0 reactions 0 assignees View on GitHub
Cache Logging Stale
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

hello !

i would like to ask about cache.config

cache.config is below

----------------------------------------------------------------------------------------------------------------------

`dest_domain=test2222.kinxzone.com ttl-in-cache=20s`

----------------------------------------------------------------------------------------------------------------------

records.yaml is below

----------------------------------------------------------------------------------------------------------------------

```
records:
http:
connect_attempts_max_retries: 3
cache:
http: 1
required_headers: 0
max_stale_age: 0
server_ports: 80 80:ipv6 443:ssl
normalize_ae: 2
reverse_proxy:
enabled: 1
url_remap:
pristine_host_hdr: 0
remap_required: 1
log:
logging_enabled: 3
logfile_dir: var/log/trafficserver
rolling_enabled: 1
rolling_interval_sec: 300
rolling_allow_empty: 1
rolling_max_count: 10
ssl:
client:
version:
min: 2
max: 3
certification_level: 1
verify:
server:
policy: PERMISSIVE
server:
multicert:
exit_on_load_fail: 0
cert:
path: /opt/ts/etc/trafficserver/ssl
private_key:
path: /opt/ts/etc/trafficserver/ssl
diags:
debug:
enabled: 1
```

----------------------------------------------------------------------------------------------------------------------

and i did `curl https://test2222.kinxzone.com/cat/cat1.jpg`

about 20 seconds later, i did `curl https://test2222.kinxzone.com/cat/cat1.jpg` again

but always `*_HIT` Nothing `TCP_MISS`

even i set revalidate 20s
and, pin-in-cache 20s

but same result

i refered https://docs.trafficserver.apache.org/en/10.0.x/admin-guide/files/cache.config.en.html

i know that PURGE method can be used to clear cache exactly

curl -X PURGE https://test2222.kinxzone.com/cat/cat1.jpg

it works well,

and invalidating cache by using regex revalidate plugin as well

event.log is below

----------------------------------------------------------------------------------------------------------------------

```
1724744803 3 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_HIT 0 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_HIT 1 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 2 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 3 5912 127.0.0.1
1724744829 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 4 5912 127.0.0.1

```
----------------------------------------------------------------------------------------------------------------------

i would like to see `TCP_MISS` on event.log

how to set cache.config for setting ttl exactly ?

Please give me some any informations

@bneradt @calavera @janfrode @biilmann @jpeach @sekimura @mlibbey

thank you !!!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.