Hello,
We start playing with the BikePoint api.
When we try to count number of bikes each 5 minutes, we had sometime “incorrect” data (maybe cached ?)
I tried to debug with curl and sometime, the API return strange headers
date: Mon, 15 Mar 2021 08:43:45 GMT
content-type: application/json; charset=utf-8
cache-control: No-Cache, s-maxage=604800.000
via: 1.1 varnish
age: 125894
access-control-allow-headers: Content-Type
access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS
access-control-allow-origin: *
api-entity-payload: Place
x-backend: api
x-cache: HIT
x-cache-hits: 2200
x-cacheable: Yes. Cacheable
x-frame-options: deny
x-no-smaxage: true
x-proxy-connection: unset
x-ttl: 604800.000
x-ttl-rule: 3
x-varnish: 228692015 218832366
x-aspnet-version: 4.0.30319
x-operation: BikePoint_GetAll
x-api: BikePoint
cf-cache-status: DYNAMIC
cf-request-id: 08d6a7495f0000fa80d9ac5000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 630474bbc982fa80-AMS
See the age
and x-ttl
value.
Most of the times, values are less than 60 and 60
for x-ttl
.
eg:
date: Mon, 15 Mar 2021 08:56:26 GMT
content-type: application/json; charset=utf-8
cache-control: public, must-revalidate, max-age=30, s-maxage=60
via: 1.1 varnish
age: 0
access-control-allow-headers: Content-Type
access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS
access-control-allow-origin: *
api-entity-payload: Place
x-backend: api
x-cache: MISS
x-cacheable: Yes. Cacheable
x-frame-options: deny
x-proxy-connection: unset
x-ttl: 60.000
x-ttl-rule: 0
x-varnish: 1644999551
x-aspnet-version: 4.0.30319
x-operation: BikePoint_GetAll
x-api: BikePoint
cf-cache-status: DYNAMIC
cf-request-id: 08d6b2e00900004c62f583b000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 630487467c734c62-AMS
what I understand is the API return old data ? Why and how to fix it ?
Thanks