How to avoid caching a post type completely with all its posts

Avoid caching a post type

WordPress is a content management system that allows us to create and publish different types of content, such as posts, pages, media, etc. These types of content are known as post types, and each one has its own characteristics and functionalities.

What is Flash Cache and how does it work?

Flash Cache is a WordPress plugin that allows you to create caches of posts and pages in HTML and even in PHP if necessary. This can improve the performance and speed of your website by reducing load time and server resource consumption. ๐Ÿš€

However, sometimes we may not want certain types of content to be cached, either because they are dynamic, because they contain sensitive information, or because we want them to be updated frequently.

In this post, we will explain how to avoid caching a post type with all its posts with the feature to create patterns included in the Flash Cache, where you can decide which posts types to cache and which not to cache, which is very useful for users.

Avoid caching a post type

To avoid caching a post type completely with all its posts, the first thing we have to do is to identify the name of the post type that we want to exclude from the cache. For example, if we have created a custom post type called “Products”, that will be the name we have to use.

Then, we have to go to the WordPress administration panel, and look for the Flash Cache option in the side menu. There, we will see a section called “Patterns”, where we will be able to add, edit or delete the patterns we want.

In the editing screen, we can assign a name to the pattern to identify it easily. For example, “Do not cache products”.

Then, in the page type options are the different post types available on your site that can be cached, you can decide at what point, for example when creating or updating a post, you can also choose pages such as frontpage, archives, feeds, author page and more, where other caching options will be used.

For this example we will check all post types except “Products”.

After creating the pattern, the products created on your site will not be cached and their information such as title, content, price and so on will be kept updated.

To conclude

In this post, we have seen how to avoid caching a post type completely, using the Flash Cache plugin. This can help us to optimize the use of cache on our website, and avoid storing content that we do not want or that need to be updated.

Don’t wait any longer to try the Flash Cache free version available in the WordPress, and take a look at the PRO version where you will get more amazing features. ๐Ÿ˜Š

You might be interested in …

Leave a Reply

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