I just have a question. I've built a database application (dynamic application) using Toolset Plugins where users creates records and update records via different CRED forms. I'm using Views to show those records in various screens filtered by queries (based on custom fields they enter). All the views I've set the cached=off property. Is it recommended that for a dynamic web application, we set the cached attribute to off (cached="off") or can we leave it on to gain performance? Will record updates be reflected immediately on the views or retrieve cached data? Just wanting to get some direction so improve performance of the app.
Hello,
You can set the cached attribute to on by removing attribute cached="off", it will gain performance.
The record updates will be reflected immediately on the views in most cases.
See our document:
https://toolset.com/documentation/user-guides/front-page-filters/how-to-use-views-parametric-search-on-large-sites/
For example, when you update a post or create a new taxonomy term. The Views plugin automatically invalidates cache after 24 hours.
Thanks Luo. So if a post/record is updated via the CRED Post Form, does that trigger an invalidation? Or do you mean that when a Post is updated, the invalidation will not happen for 24 hours and so on other views that same Post will still show old information?
Thanks,
Mukesh
There is a misunderstand, it means these:
1) If a post/record is updated via the CRED Post Form, that will trigger an invalidation.
2) And the Views cache will be invalidated after 24 hours automatically.
Thanks Luo.
Just one additional question. What best way can you suggest to debug/troubleshoot query performance for a View? What can I look into or do to see why some of my Views are taking 15 seconds to run. Our Posts database is just over 3,700 posts so it shouldn't be data volume. But could be something I am doing. For most of my views, I use the Query Filter and then within the loop I have IF statements to filter out more records from the view. For some complex Queries that can't be done via the QUery Filter, I'm using the wpv_filter_query FILTER.
Thanks,
Mukesh
My issue is resolved now. Thank you!