summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/mongodb/plugins/cache
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/mongodb/plugins/cache')
-rw-r--r--ansible_collections/community/mongodb/plugins/cache/mongodb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ansible_collections/community/mongodb/plugins/cache/mongodb.py b/ansible_collections/community/mongodb/plugins/cache/mongodb.py
index b51b7b293..0fa7a2cd8 100644
--- a/ansible_collections/community/mongodb/plugins/cache/mongodb.py
+++ b/ansible_collections/community/mongodb/plugins/cache/mongodb.py
@@ -182,7 +182,7 @@ class CacheModule(BaseCacheModule):
def contains(self, key):
with self._collection() as collection:
- return bool(collection.count({'_id': self._make_key(key)}))
+ return bool(collection.count_documents({'_id': self._make_key(key)}))
def delete(self, key):
del self._cache[key]