Closed Bug 870447 Opened 12 years ago Closed 12 years ago

Bind model cache to request cache to facilitate cache rewriting

Categories

(Marketplace Graveyard :: Consumer Pages, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2013-05-16

People

(Reporter: basta, Assigned: basta)

References

Details

(Keywords: perf, Whiteboard: p=2)

When a view is being rendered and elements in the plucked output are being cast to the model cache, the model cache should replace the objects in the source data with references to themselves if the source data comes from the request cache. Consider the following scenario: - A review is added to an unreviewed app - The cache rewriting updates the model cache to show that it has one review and the average rating is updated to the user's rating. - A page is rendered containing the app object, and the page is in the user's request cache. The app wasn't originally added to the model cache from that page. - Each app, as it passes through the builder, is passed to models('app').cast, which does nothing since the apps are already in the model cache. - The page will still display the old (unreviewed) values. This fix will change the fourth step to the following: - Each app, as it passes through the builder, is passed to models('app').cast, which rewrites the request cache's app object reference (allowing a GC of the request cache's copy of the app object) to use the model cache's copy. Note that app objects from uncached requests should still overwrite the model cache's copy of the app object (allowing other request cached pages to use the updated app object from the new request through this same process).
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 995288
You need to log in before you can comment on or make changes to this bug.