Merge pull request #1592 from MITx/fix/cdodge/optimize-instructor-dashboard

additional courseware view optimizations. Do a 'depth' fetch on the sele...
This commit is contained in:
chrisndodge
2013-03-04 17:19:53 -08:00
2 changed files with 9 additions and 1 deletions

View File

@@ -64,7 +64,11 @@ class CachingDescriptorSystem(MakoDescriptorSystem):
location = Location(location)
json_data = self.module_data.get(location)
if json_data is None:
return self.modulestore.get_item(location)
module = self.modulestore.get_item(location)
if module is not None:
# update our own cache after going to the DB to get cache miss
self.module_data.update(module.system.module_data)
return module
else:
# load the module and apply the inherited metadata
try: