Commit 192222f2 by Ned Batchelder

Use a better metadata_cache_key

The old code created keys like "('course', 'org')", and the space
character caused a warning from Django during tests.  Also, strings are
probably better than tuples for keys.
parent 5fc5587f
......@@ -246,7 +246,9 @@ def location_to_query(location, wildcard=True):
return query
metadata_cache_key = attrgetter('org', 'course')
def metadata_cache_key(location):
"""Turn a `Location` into a useful cache key."""
return u"{0.org}/{0.course}".format(location)
class MongoModuleStore(ModuleStoreBase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment