Cache specific SQL queries




Wordpress LScache Plugin: Cache specific SQL queries

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi there, great plugin! It really speed up my Buddypress network with WPML multilanguage support. I have one question / feature request: In query monitor, I still see quite a lot of queries which will ALWAYS return the same row/rows ? is there a way to tell Litespeed Cache to cache the output and avoid those sql queries? E.g. queries like: SELECT FROM wp_bp_xprofile_fields WHERE parent_id = 105 AND group_id = 1 ORDER BY option_order ASC OR SELECT option_value FROM wp_options WHERE option_name = siteurl LIMIT 1 OR SELECT FROM wp_pmpro_membership_levels Expand Not sure why they are not cached, but run on EVERY page load!? Thank you so much in advance! Hi, sadly no , LSCPW is a page cache , not database cache however it does have an object cache feature , you can set up your query result into object cache and then query from there something like wp_cache_add( key , value ) ?> to put your query result then , use wp_cache_get( key ) ?> to retrieve it



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference