Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor pwtyler

    (@pwtyler)

    Hi there—

    Glancing at the ChatGPT conversation, it looks like ChatGPT hallucinated that filter pantheon_wp_edge_max_age, but the second approach looks promising— Pantheon’s cache control filters rest_post_dispatch at priority 10, so firing your filter after that should work.

    I wanted to confirm that you are indeed asking to adjust the max age for the REST API but not the rest of the website, correct? The current filter available, pantheon_cache_default_max_age would cover every page, but I think is more than you’re asking for.

    add_filter( 'pantheon_cache_default_max_age', function() { return 600; } );

    I double checked that this wasn’t already an option with our filters, and it’s definitely a solid feature/option to have— I’ll open an issue on GitHub and get it into our internal systems as well.

    Re the docs screenshot, looks like we’ve got that tracked in our documentation team’s queue (which is probably still on me to fix ??) as well.

    Thread Starter palmerijosh

    (@palmerijosh)

    Thanks for the quick reply, Phil!

    I’m not surprised that my “intern” aka ChatGPT hallucinated that filter value ??

    I wanted to confirm that you are indeed asking to adjust the max age for the REST API?but not the rest of the website, correct?

    That’s correct, I’m asking for a new feature to control cache for API separate from website. Thanks so much for opening an issue on GitHub for this!

    I’ll watch for updates. Again, truly appreciate the quick reply.

    Plugin Contributor pwtyler

    (@pwtyler)

    Alright we’ve got this tracked on GitHub and internally, but in the meantime if you get something working with ChatGPT’s second suggestion there, let us know here or in Github, as I expect any generalized solution we end up with would look pretty similar.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.