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;