I'm creating summary descriptions by year. To do this I do update_post_meta
on save to set values for word count, image count, external link count.
So for a year archive page I iterate over each post to create sums and then format the result.
With caching I can be sure to serve cached results to the users.
But during development with caching on I do notice the slowness.
I was considering using a cron like mechanism to create the HTML summaries in a subdirectory of the wp-content
folder or as wp_object_cache
items with a names like summary-YYYY.html
for the summary or summary-YYYY.json
.
My question:
What are my options for storing data like these? Are there any best practices for naming keys in the object cache? Are there other ways to associate arbitrary data with a year?