How to stop WP API endpoint from caching?

If you have access to your request header you can add the line.
Cache-Control: private or Cache-Control: no-cache. This will force well-behaved hosts to send you fresh results.

Leave a Comment