Introduction to Precaching: One of the most important features of SuperPWAs is the ability to load fast and to work on slow network conditions or even offline. To achieve this, we can use a service worker to precache the app and, when available, use the network only to fetch necessary data.
In our SuperPWA plugin, we’ve implemented the Pre-caching functionality which helps you to cache the content.
There are two ways you can cache the content
Step 1: You need to go to WordPress Dashboard -> SuperPWA -> Add-ons-> Click on the Caching Strategies Add-on “Activate” button
Step 2: After Activating Caching Strategies plugin you need to click on the settings button as shown below the screenshot.
- Now you can access the Settings page. By enabling the Automatic option you can cache the Post, Page, and Custom Post Type, and also you can set the number of posts that you want to cache.
- You will find this option in the WordPress Dashboard -> SuperPWA -> Settings -> Features (Addons) ->After Activating Caching Strategies plugin you can access setting page. By enabling the Manual option, you can directly add the URLs which you want to get the cache.
Note: You can cache as many posts as you want but it will be better if you use 10 posts for better performance.
That’s it for this tutorial!
We hope we’ve clear your doubts in case If you have any feedback or questions, Just contact us here and we are always available for you.