'Invalidate the caches for the restricted course.'

@classmethod
def invalidate_cache_for_course(cls, course_key):

    cache.delete(cls.COURSE_LIST_CACHE_KEY)
    log.info('Invalidated    cached    list    of    restricted    courses.')
    for access_point in ['enrollment', 'courseware']:
        msg_cache_key = cls.MESSAGE_URL_CACHE_KEY.format(access_point=access_point, course_key=course_key)
        cache.delete(msg_cache_key)
    log.info('Invalidated    cached    messaging    URLs    ')
