Product table caching
Global cache setting
The full contents of your posts tables can be cached to improve performance and speed up page load times.
The enable caching, go to the plugin settings page (Settings > Posts Table Pro) and tick the 'Caching' option:
You can configure the length of time that tables will be cached for. The default is 6 hours. Enter a whole number of hours to change the caching period.
Potential caching issues
Please bear in mind that if you enable caching, any changes you make to your product catalogue (e.g. changing product names, prices, etc) will not appear immediately in your table.
The same applies if you manage stock in your WooCommerce store. If caching is enabled then the product table may say that a product is in stock or out of stock when this is not the case, because a cached version is being shown to your users. For this reason, if your stock changes very regularly then we do not recommend enabling the caching option. (Note: If the cached product table incorrectly shows that a product is in stock, then the customer will not be able to purchase it because an error will display when they click through to the cart and checkout.)
Once the 'cache expiry' time has elapsed, the cache will be cleared and any changes will then be picked up.
Setting via the shortcode
You can also enable or disable caching for individual product tables via the shortcode. Use the
cache option, as in the following example. The cache expiry time set in the main plugin settings will be used.
How to flush the cache
To flush the cache, you can temporarily set the
cache option to false, then re-load the page. Alternatively, uncheck the 'Caching' option in the plugin settings, then reload your product table page to flush the cache.
The product table cache is stored as a transient, using the WordPress transient API. The location of the data will depend on your server setup. By default, transients are stored in the
wp_options table, but if you're using an external object cache, the transients will be stored in memory.