1. Home
  2. Knowledge Base
  3. WooCommerce Product Table
  4. Product Table Options

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 (WooCommerce → Settings → Products → Product tables) 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.

[product_table cache="true"]
[product_table cache="false"]

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.

Cache storage

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.

Caching plugins

You can also use caching plugins such as WP Rocket with WooCommerce Product Table. These will work alongside the built-in product table caching described above.

The same warnings apply as we mentioned above for the built-in caching. For example, if you need any of the data in the table to be loaded fresh for each user then it's best to disable caching for that page.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.