Actions
Issue #1395
closedBy default, all our MongoEngine QuerySets cache query results
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
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.
Actions
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