-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Steps to reproduce:
class User(Document):
name = StringField()
User.drop_collection()
User.objects.create(name='aaa')
User.objects.create(name='bbb')
User.objects.create(name='ccc')
qs = User.objects
print qs.count(with_limit_and_skip=True) # 3
User.objects.create(name='ddd')
print qs.count(with_limit_and_skip=True) # still 3 :(
Expected behavior: the 2nd count returns 4.
Actual behavior: the 2nd count returns 3, because the query set's previous count result is cached.