To improve the performance of your WordPress site, the Top 10 plugin includes inbuilt caching. This guide will walk you through enabling and configuring these settings.
Why Enable Caching?
Caching helps reduce the load on your database and speeds up the delivery of popular posts to your users. By enabling caching, you ensure that your website runs efficiently, even under heavy traffic.
Enabling/disabling caching
Caching in Top 10 is enabled by default to optimize the popular posts out-of-the-box. You can toggle the Enable Cache setting by navigating to Top 10 > Settings and the General tab.
Top 10 will use the Transients API to cache the popular posts output. By default, the plugin will cache the posts for an hour. However, you can change this by updating the Time to cache setting.
On multilingual sites, cache keys include the current language via Language_Handler::get_cache_language(), so a cached list from one language is not served to visitors of another. You can adjust the language component of the key with the tptn_cache_language filter.
Automatic refresh
Cached lists refresh without waiting for the cache time to expire when their data changes:
- Top 10 aggregates new views into the count tables.
- A view count is set, edited, imported, or deleted.
- A post is created, updated, or deleted.
On a multisite network, site-specific changes invalidate that site’s lists and Pro lists that include its posts. Bulk operations can invalidate caches across the network. Changing the data source also starts a fresh set of cached lists.
Clearing the cache
You can manually clear the plugin cache by visiting the Tools page and using the Clear Cache button. Top 10 Pro users also have a dedicated Clear cache button in the Settings page at the bottom.


Blocks in Top 10