diff --git a/cacheops/conf.py b/cacheops/conf.py index 32e5b6fa..f4845394 100644 --- a/cacheops/conf.py +++ b/cacheops/conf.py @@ -21,7 +21,7 @@ class Defaults: CACHEOPS_SENTINEL = {} # NOTE: we don't use this fields in invalidator conditions since their values could be very long # and one should not filter by their equality anyway. - CACHEOPS_SKIP_FIELDS = "FileField", "TextField", "BinaryField", "JSONField" + CACHEOPS_SKIP_FIELDS = "FileField", "TextField", "BinaryField", "JSONField", "ArrayField" CACHEOPS_LONG_DISJUNCTION = 8 CACHEOPS_SERIALIZER = 'pickle' diff --git a/tests/tests.py b/tests/tests.py index 571cb1c9..f450cf48 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -730,11 +730,10 @@ def test_480(self): conditions.append(reduce(operator.or_, queries)) list(queryset.filter(reduce(operator.and_, conditions)).cache()) + @unittest.skipIf(connection.vendor != 'postgresql', "Only for PostgreSQL") def test_489(self): - _ = TaggedPost.objects.create(meta={}, tags=[1, 2, 3]) - tags = TaggedPost.objects.cache().exclude(tags=[]) + TaggedPost.objects.cache().filter(tags=[]).count() - self.assertEqual(tags.count(), 1) class RelatedTests(BaseTestCase): fixtures = ['basic']