Scope of Cache-Timers

When I pull Market orders I do it for one Type ID at a time.
But I am pulling Order-data for 100+ Types in short order from here:

The Cache timer is 300 seconds.

My question is, what exactly these 300 seconds refer to.
When I requested the data for one type-ID, do I have to wait 300s before doing any request to


or can i pull 100 types in short oder this way and have to wait 300s until I request the same type again ?

It’s related to the freshness of the data. I.e. future requests for the same items would return stale data until the cache timer expires in 300 seconds. IIRC you can use the last-modified and expires headers to figure out when exactly it’ll be fresh again.

Depending on the items you’re pulling, might just be faster to fetch all the pages, and handle all your items at once. Or if you only really care about min buy and max sell, could consider using an aggregate API like Fuzzwork Market Data. Assuming 30min cache timers are okay for your use case.

It’s scoped to the whole request, so no, if you fetch all data for type 34, you don’t then need to wait to fetch all data for type 35 for example because those are different requests and will have different responses.

You don’t technically have to wait to request the same type again, it’s just you’ll only be getting the cached response back so it’d be a waste to do so and it’s nicer on the servers if you cache it locally.

Bear in mind though that the public endpoints will be cached for everyone, so if you look at type 34, then I do a request for the same, I’ll likely see the same data as you as we’re both going to be looking at the same cached response. And even the data you are looking at when you run it is likely already cached and so won’t be entirely fresh.

Just going to repeat a very important point: If you’re requesting more more than ~10 types. it will be a million time faster to omit the typeID parameter and get all orders. It’s simply a waste of requests, and I would advice against wasting ESI resources like that.

Other advice: Be sure to check the last-modified header to ensure all the pages are generated at the same time. If you send your requests as soon as the cache expires you may hit some pages still cached on the cloud side of ESI. The longer you wait the less chance there is of that happening (somewhere between a few hounded ms to 10s is my suggestion).

Also, read the docs:

At a minimum read the rules:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.