'Prefetches visible blocks for the given course and stores in the cache.
Returns a dictionary mapping hashes of these block records to the
block record objects.'

@classmethod
def _initialize_cache(cls, course_key):

    prefetched = {record.hashed: record for record in cls.objects.filter(course_id=course_key)}
    get_cache(cls.CACHE_NAMESPACE)[cls._cache_key(course_key)] = prefetched
    return prefetched
