Timeline for Use Transient API to cache queries for all posts in all categories?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2017 at 13:15 | comment | added | Nicolai Grossherr | @lowtechsun My pleasure. | |
Jun 25, 2017 at 10:36 | comment | added | lowtechsun | Really appreciate the answer, this got me a good step forward, thank you. | |
Jun 24, 2017 at 21:16 | comment | added | Nicolai Grossherr | @lowtechsun Ah yes, you're right. That's kind of the reason why I wrote e.g. I didn't went trough all of your question to be honest. WordPress actually has a caching mechanism for queries, but don't ask me for details. In my mind it makes absolutely sense to use transients in your use case. But you can test it yourself, by measuring loading time. | |
Jun 24, 2017 at 20:44 | comment | added | lowtechsun | Thanks heaps for your help! From what I can see it works well. I had to change $category to $category->slug in both places to get the string of the category and not the category object. Now, last thing, is this actually a good thing to do, caching categories and posts? This is for a part of the website where categories and posts only change rarely, if so the cache is deleted and re-created with the changed content. * | |
Jun 24, 2017 at 20:36 | vote | accept | lowtechsun | ||
Jun 24, 2017 at 20:35 | review | Suggested edits | |||
Jun 24, 2017 at 20:51 | |||||
Jun 24, 2017 at 18:22 | history | answered | Nicolai Grossherr | CC BY-SA 3.0 |