apache / trafficserver

Apache Traffic Serverâ„¢ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.82k stars 807 forks source link

[Question]How to purge cache obejects by a url pattern? #9911

Open xq2248 opened 1 year ago

xq2248 commented 1 year ago

The answer of ChatGPT: traffic_ctl cacheurl flush http://example.com/abc/ traffic_ctl cacheurl flush ^https?://([^:/?])(:[0-9]*)?(/[0-9a-zA-Z]{32}

[myhost@localhost ~]$ traffic_ctl cacheurl flush http://example.com/abc/* Error: No subcommand found for traffic_ctl

It does not work.

marcin-wadolkowski commented 1 year ago

If you want to delete single object (not pattern): https://docs.trafficserver.apache.org/en/latest/admin-guide/storage/index.en.html#removing-an-object-from-the-cache

If you want to use regex: https://docs.trafficserver.apache.org/en/latest/admin-guide/storage/index.en.html#inspecting-the-cache

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.