As per documentation: https://mariadb.com/kb/en/mariadb/documentation/replication-cluster-multi-master/galera/getting-started-with-mariadb-galera-cluster/

Disabling query_cache (and setting size to 0M so it doesn't allocate the RAM)
This is a huge reason for seeing deadlocks with Galera, hence the mandatory turning off

(cherry picked from commit 5cecca96824b992a93140ae65838b95d5e658232)
Merge pull request #290 from mancdaz/icehouse-143

Disable mariadb query-cache to resolve deadlocks