Filter: bricks/query/cache_key
Filters the cache key used for a Bricks query loop. Use it when external context, such as language, should split query cache entries.
Parameters
Section titled “Parameters”$cache_key(string): The generated query cache key.$query(Bricks\Query): The Bricks query instance.
Example usage
Section titled “Example usage”add_filter( 'bricks/query/cache_key', function( $cache_key, $query ) { if ( function_exists( 'pll_current_language' ) ) { $cache_key .= '_' . pll_current_language(); }
return $cache_key;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.