1. Document Library Pro
  2. Document Library Options

Document library caching

Global cache setting

The full contents of your document library can be cached to improve performance and speed up page load times. Caching is available for the table layout and not for the grid layout, which is designed for listing smaller numbers of documents.

The enable caching, go to the plugin settings page and tick the 'Caching' option:

Document Library Pro caching option

You can configure the length of time that tables will be cached for. The default is 6 hours. To change this, enter a whole number of hours in the box.

Bear in mind that if you enable caching, any changes you make to your documents (e.g. changing names, publishing new items, etc) will not appear immediately in your table. 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 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.

[doc_library cache="true"]
[doc_library cache="false"]

Flushing 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 table page to flush the cache.

Cache storage

The documents 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.

Related Articles

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