WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
36 stars 2 forks source link

When to use Transients API and how #213

Closed bph closed 3 weeks ago

bph commented 5 months ago

Discussed in https://github.com/WordPress/developer-blog-content/discussions/29

Originally posted by **bph** December 4, 2022 Thank you @Milana for suggesting this topic. When you have a minute, maybe you can elaborate a bit on what this blog could cover.
ryanwelcher commented 1 month ago

I have started my draft here. It's not ready for review yet but I wanted to get it added here for reference

ryanwelcher commented 1 month ago

Draft is ready for first review - https://docs.google.com/document/d/1Qju0NTZGVc5ESqrZi_h39PPu4dCLvIiwy3vGuRTVNyg/edit#heading=h.7mmnqqs4uize

@zzap I'd love your input on this. Especially any good use-cases that can be added.

justintadlock commented 1 month ago

I'm working on the first review.

justintadlock commented 1 month ago

Great job, @ryanwelcher! I'm finished with the first review.

zzap commented 4 weeks ago

@ryanwelcher thank you so much for working on this article. Great job and very informative.

@zzap I'd love your input on this. Especially any good use-cases that can be added.

I think you have great examples. Another good one could be saving third-party API response.

Another thing I would add, because I hear many developers mixing these two, is the main difference between caching and transients: storage (object, page, browser vs database and memory if caching is enabled), persistence etc

ryanwelcher commented 3 weeks ago

Another good one could be saving third-party API response.

Fantastic example, I'll get that added.

Another thing I would add, because I hear many developers mixing these two, is the main difference between caching and transients: storage (object, page, browser vs database and memory if caching is enabled), persistence etc

Great callout. I need to update the intro and this might be a good fit there.

ryanwelcher commented 3 weeks ago

Second draft is complete and ready for second review - https://docs.google.com/document/d/1Qju0NTZGVc5ESqrZi_h39PPu4dCLvIiwy3vGuRTVNyg/edit

justintadlock commented 3 weeks ago

@ryanwelcher - Here are the checklists before and after publishing:

Pre-publishing checklist:

Post-publishing checklist

ryanwelcher commented 3 weeks ago

Public preview is available here. Planning on publishing tomorrow morning.

ryanwelcher commented 3 weeks ago

Social Copy:

The Transient API is a powerful tool for WordPress developers looking to speed up their sites. Explore how to use them here:

https://developer.wordpress.org/news/2024/06/11/an-introduction-to-the-transients-api/

ryanwelcher commented 3 weeks ago

The article has been published - https://developer.wordpress.org/news/2024/06/11/an-introduction-to-the-transients-api/

StevenDufresne commented 3 weeks ago

Love the article!

Very minor; there are a couple of indentation issues in the code samples.

Screenshots

Screenshot 2024-06-12 at 8 55 46 AM Screenshot 2024-06-12 at 8 53 05 AM
ryanwelcher commented 2 weeks ago

Thank @StevenDufresne!

I've fixed that, the formatting was a little odd from as I had it in a Google doc. Moving foward, I'll paste it into an IDE then to the article