 
   reset: ->
     @_exercises = []
-    @_exerciseCache = []
+    @_exerciseCache = {}
     @_unsavedExclusions = {}
 
   loadForCourse: (courseId, pageIds) -> # Used by API

      isExcluded = _.bind(@.exports.isExerciseExcluded, @)
      for uuid in getExerciseCnxModUuids(exercise)
        exercises = @exports.forCnxModuleUuid.call(@, uuid)
        excluded = _.filter _.pluck(exercises, 'id'), isExcluded
        availableCount = exercises.length - excluded.length
        if (availableCount is 5) or (excluded.length is 0 and exercises.length <= 5)
          return availableCount

        @_exerciseCache[exerciseId]?.is_excluded

    forCnxModuleUuid: (uuid) ->
      exercises = {}
      for id, exercise of @_exerciseCache when not exercises[id]
        for exerciseUuid in getExerciseCnxModUuids(exercise)
          exercises[id] = exercise if uuid is exerciseUuid
      _.values exercises

    getChapterSectionOfExercise: (ecosystemId, exercise) ->
      getChapterSection(ecosystemId, exercise)
