← Back to Home

Cache n Seconds

/cache/:n
Sets Cache-Control header for n seconds.

Parameters

n path
Cache duration in seconds

Examples

curl
curl -I https://tcpdata.com/cache/3600
JavaScript (fetch)
fetch('https://tcpdata.com/cache/3600')
  .then(res => console.log(res.headers.get('Cache-Control')));
Python (requests)
import requests

response = requests.get('https://tcpdata.com/cache/3600')
print(response.headers.get('Cache-Control'))