MongoEngine / MongoEngine/mongoengine

Default to non caching querysets

Open
#403 4 comments 2 reactions 1 assignee View on GitHub

@bagerard is already working on this.

Since Oct 5, 2019.

Dominant language
Python
Stars
4.3k
Forks
1.2k
Avg merge
4h 41m
Merged PRs (30d)
11

Description

We've always had a __len__ helper in the queryset, but it had side effects - it caused a query.

To fix that I implemented a cached queryset (ala django) but thats less than ideal also see: #365 as memory usage could be huge.

So the plan is to flip the default in 0.9 and don't provide a __len__ by default.

  • Need to support no_cache in the ne default (just return self) and educate users in the docs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.