From 38796f9d0c0c6259b1f1761d3cd4a7481ffb66d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Thu, 12 Oct 2017 15:31:14 +0000 Subject: [PATCH] N.1065 Fix performance issues. * Does not cache requests containing "id NOT IN ..." (too specific) SVN:trunk[5019] --- core/dbobjectsearch.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dbobjectsearch.class.php b/core/dbobjectsearch.class.php index aa6ca8bc0..973c8acbe 100644 --- a/core/dbobjectsearch.class.php +++ b/core/dbobjectsearch.class.php @@ -1485,7 +1485,7 @@ class DBObjectSearch extends DBSearch // Need to identify the query $sOqlQuery = $oSearch->ToOql(false, null, true); - if (strpos($sOqlQuery, '`id` IN (')) + if ((strpos($sOqlQuery, '`id` IN (') !== false) || (strpos($sOqlQuery, '`id` NOT IN (') !== false)) { // Requests containing "id IN" are not worth caching $bCanCache = false;