Powered Cache 1.2 (including premium edition) has been released. The new version comes with new cool features and bug fixes.
Table of Contents
Fixing the broken part of caching
The version 1.2 comes with new enhancements and bug fixes. I’d like to mention a little bit more detail about them.
Trailing Slash Thing
When your website’s URL structure ends with slash
/ WordPress generates internal links with trailing slash.
E.g., When you request `https://poweredcache.com/features`, it should be redirected to `https://poweredcache.com/features/` by the canonical API. WordPress smart enough to add canonical tags to page source but there are some edge cases. So, caching plugins shouldn’t change WordPress’ behavior.
Example for the “edge case”: Think about, you are using redirection plugin and adding redirection rule when the post moved trash or slug changes. If your website responds the URL without trailing slash, you should add two redirection rule, or you have to use regex based redirection.
So making things simple; “don’t change WordPress default behavior, there is a reason to core redirects URL”
Wrong Content Type and Missing Headers
Previous releases of Powered Cache assume that every cached page is HTML, this is an apparently wrong assumption. WordPress can generate a different kind of outputs, like API endpoints which are using JSON.
The possible threat about this; If your website serves API endpoints as HTML instead of JSON, robots might index that pages too. Because there is no `X-Robots-Tag` header to prevent indexing. Also, if your website has a mobile app, It is strict about content type.
Where is the broken part – duh?
As you may see, (sometimes) caching is not that easy at all, and you might don’t even care these problems. Technically, these are huge problems, and some of “popular” caching plugins didn’t solve this problem.(a few of them don’t cache those pages to avoid)
This is why I called “broken part.”
Anyway, you are reading this post, so you are aware the problem, use Powered Cache and don’t look back 😉
Let’s continue with fun parts; new features 🙂
If you want to make fast your website’s dynamic parts, fragment caching is your friend.
Here is the usage:
`powered_cache_fragment( ‘unique-key’, 3600, ‘my_callback_func’);`
Yup! simple as it 🙂
You can run diagnostic when needed.
APCu now available for the object caching backend. (Selection will appear when PHP support APCu.)
Under the Hood
You can see the detailed changelog here. I’m happy to finish this year with a new release. (I hope that, I won’t have to release maintenance release before the new year 🙏)
Happy new year everyone 🙂 Don’t forget to update your plugin. 🍾🎉🎊