Frontier Query is using caching is two different ways
All cache records are reset (deleted) when you upgrade/delete Frontier Query and each time you save Frontier Query settings.
Please note that if you remove Frontier Query by deleting the plugin folder, cache records are not deleted. They will be deleted on a wordpress upgrade.
Frontier query uses multidimensional arrays to a great extent to limit the number of sql queries. These multidimensional arrays are used to create the value lists displayed in the widget definition, Shortcode builder and the search form. They are also used throughout the code to get values and validate input.
All lists are cached in one record using WordPress Transient API.
You can change the caching time for Lists in Frontier Query Settings – It is not recommended to use a cache time below 5 minutes.
Lists for the following objects are cached:
- Authors (only users that has published at least one post)
- Taxonomies (Category, Tag and custom taxonomies, only selected taxonomies are cached).
Results are cached from:
Shortcodes & Widgets
Results from the shortcodes are cached (Cache time can be set in settings).
If you are using more than one shortcode in the same post/page, it is imporant that each shortcode has a separate sequence, also for the widget shortode. Widgets has a built-in sequence, but this is not used when widgets are used in post/pages, so use sequence instead.
As the shortcodes can contain dynamic filter values (auto_archive or current_user) Frontier Query will store a separate record for arch filter value, once resolved at runtime.
Cache is deleted each time you save the post/page where you are using the shortcode, or when you update the widget.
The search fields and values are cached once a user submits a search (Cache time can be set in settings).
The reason for using caching in Frontier Query is to limit the number of SQL queries generated by WordPress. The number SQL queries is a general bottleneck of WordPress.
Frontier Query queries are optimized (incl. new taxonomy structure from ver WP 4.3), and will perform well on site with a large amount of posts.
Caution: The Lists caching of Frontier Query can increase memory usage on sites with a large amount of different taxonomies and/or authors (authors are only suers that has published posts).
Frontier Query cache records are prefixed with fq_ and are stored in the options table and can be found using this sql query:
SELECT * FROM `wp_options` where option_name LIKE '_transient_fq_%' ORDER BY option_name; SELECT * FROM `wp_options` where option_name LIKE '_transient_timeout_fq_%' ORDER BY option_name; Remember to replace "wp_" with you table prefix.