Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start optional object cache for parsed and preprocessed template posts #132

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

eliot-akira
Copy link
Contributor

@eliot-akira eliot-akira commented Oct 24, 2024

This pull request implements an optional object cache for parsed template posts. And in the future possibly other pre-processed and cached data.

It's similar in direction to the previous prototype except:

  • Implemented as an admin feature of the template system - instead of in the HTML parser
  • Only caches template posts - instead of every template rendered
  • Refresh cache on post save, and use post type and ID for cache key - instead of creating and comparing a hash of template content

Status: Working but experimental, needs testing and real-life usage

@GabrielGallagher @titus-toia


Use the Transients API if you need to guarantee that your data will be cached. If persistent caching is configured, then the transients functions will use the wp_cache_* functions described in this document. However if persistent caching has not been enabled, then the data will instead be cached to the options table.

@eliot-akira eliot-akira merged commit a65d68e into main Oct 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to turn on experimental caching
1 participant