Skip to Main Content

Configuration of the W3TC plugin: the database cache - Episode 5

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 701.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

We continued our tutorial series on configuring the W3TC plugin. As a reminder, W3TC is the abbreviation of the name " W3 Total Cache Which is a famous plus for caching one's blog. Caching a blog means making identical data easily accessible to the server.

You can read our previous tutorials on the subject to find out more.

The configuration page of the database caching menu has two sections: General and Advanced.


The section General "Has just one option: a check box, checked by default, which makes it possible not to cache the queries made for logged in users. What this means is that if a user is logged in, they will not have the data from the cache. The reason is that logged in users will interact with the site during their sessions. They therefore need to receive the updated data.

An exception to this, would be when a content is hidden behind a " paywall Which does not change with the opening of the connected user. In this case, the cached database is used because the users are logged in just to access the content and not to actually interact with or modify the entire content of the site.

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

The section " Advanced In the database menu allows you to refine the database cache. You can assign a life to objects in the cache with a default value being 180 seconds, and determine the length of time after which expired objects should be removed.


Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

If you are using database caching, stick to the defaults unless the database cache becomes too large. If this happens, reduce the cache object lifetime or the garbage collection interval to reduce the amount of space occupied by the database cache.

You can also specify specific pages where cached database data will not be used on subsequent pages. This is especially useful if you are making cache requests for logged in users but there are some pages where you do not want cache data to be supported.


The next field in the Advanced section allows you to specify which database query stems will be ignored - that is, not cached by the database cache. Use this field if you are using plugins that depend on querying the database.

For example, the field is prefilled with three values: gdsr_, wp_rg_, et _wp_session. These three requests correspond to the GD Rating System, Gravity Forms, and WP Session Manager plugins. These are three common plugins that need to directly query the database every time a page is loaded, not a cached version of the database. So adding these queries to the ignored list helps prevent these queries from being cached.

If you have the database cache enabled and notice that a specific plugin is not functioning normally, you will need to identify the associated query either by digging into the plugin code or asking the plugin author.

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

The field entitled " Reject Query Allows you to identify specific types of queries that should not be cached. Unless you are an administrator of the database, leave this field as it is.

That's it for the database cache configuration on W3TC. Do not hesitate to ask us questions if you do not understand a point.

This article features 0 comments

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top