Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
-
Cache Query Loops enabled + Polylang = wrong language terms/posts served from cache
-
Root cause: cache key in
query.phpline 246 ismd5("brx_query_{element_id}_{query_vars}_{parent_object_id}")— language is not part of the key because Polylang filters queries insideWP_Query/WP_Term_Queryvia hooks (parse_query,get_terms_args), which run AFTER the cache key is computed -
Problem is worse with persistent object cache (Redis/Memcached) where TTL can be much longer than 60s
Suggestion: add a filter like bricks/query/cache_key so developers can extend the key, or automatically include pll_current_language() / get_locale() in the cache key.