Issue #1395
closedBy default, all our MongoEngine QuerySets cache query results
Description
This problem is found in all our QuerySet usage, but falls into two distinct categories:
- The QuerySets from our models.
- The custom QuerySets we have.
The solution is to ensure that all our models use the QuerySetNoCache class rather than the QuerySet class, and that our custom QuerySets inherit from QuerySetNoCache. Finally, we should remove all uses of ``no_cache()`` in our current code.
Updated by jcline@redhat.com over 8 years ago
- Status changed from NEW to POST
- Assignee set to jcline@redhat.com
Updated by jcline@redhat.com over 8 years ago
Added by Jeremy Cline over 8 years ago
Added by Jeremy Cline over 8 years ago
Revision 5a361a8c | View on GitHub
Change all QuerySet objects to be QuerySetNoCache objects.
In order to not cache query results by default, all models must use QuerySet objects that are subclasses of QuerySetNoCache. This modifies all our models that don't have custom QuerySet objects to use the QuerySetNoCache by default (by inheriting from AutoRetryDocument) and introduces a superclass for all custom QuerySet classes to use which derives from QuerySetNoCache.
closes #1395
Updated by rbarlow about 8 years ago
- Status changed from POST to 5
- Platform Release set to 2.8.0
Updated by dkliban@redhat.com almost 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Change all QuerySet objects to be QuerySetNoCache objects.
In order to not cache query results by default, all models must use QuerySet objects that are subclasses of QuerySetNoCache. This modifies all our models that don't have custom QuerySet objects to use the QuerySetNoCache by default (by inheriting from AutoRetryDocument) and introduces a superclass for all custom QuerySet classes to use which derives from QuerySetNoCache.
closes #1395