Skip Navigation

[Resolved] Is there anyway to cache query?

This support ticket is created 5 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.52 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by deanL 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1236612

I created couple of views that show post counts of different post types. I have the feeling they are causing additional server overhead, especially on some pages the views are shown in more than one spot, eg hidden link — scroll to bottom, under "Number of tourist targeted scams exposed" and also within the text the footer.

I wonder if there is a way for me to tell the view to run the query only after xx mins instead of every page load?

#1236679

Hi, Views caching doesn't work exactly like that, where you can specify the cache time. You can see the criteria for Views caching explained here: https://toolset.com/documentation/user-guides/front-page-filters/how-to-use-views-parametric-search-on-large-sites/
One way to help reduce that server overhead may be to use a 3rd-party caching plugin. Some of those plugins create static HTML pages periodically, and serve them up instead of querying the database over and over. That will effectively lower your number of database queries, but also might cause some delays before new information is shown on the site. Something to keep in mind.

#1236765

Thank you Christian. I understand now.