Allow Max Age configuration for API
-
I am trying to control the cache setting for only WP API endpoints I don’t want these values cached longer than 10 minutes. The new Max Age setting as of plugin version 2.0.0 introduces a minimum value of 1 week. We had it preciously configured at 600 seconds (10 minutes).
Here’s some preliminary ideas on how to do this: https://chatgpt.com/share/670fe104-0318-8006-9c6e-9effe26a310d
Can you do any or all of the following?
- verify one of these approaches would work
- create a setting in the plugin to control cache for only the API endpoints, e.g. containing “/wp-json/wp/v2”
Thanks!
Also – the TTL screenshot on the documentation page needs to be updated: https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin#use-pantheon-cache-functions-programmatically
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.