MicrolearnENPTES

Caching with ETags

Lesson 11 of 20 · API.Micro

Ask "has it changed?" and get a tiny 304 when it has not.

{"id": 2, "name": "Latte", "price": 4, "category": "coffee"}

The menu response has an ETag header (a label for this version of the data) and Cache-Control: max-age=60 (reuse it for 60 seconds).

Check yourself

What does 304 Not Modified mean?

Do it in the browser: a real REST APIs tool, a short mission and instant feedback. No install.

Start this lesson — free
← PaginationAPI versions →

All lessons · API.Micro