   "Identifies the key used when the cache is stored in the system."
   :metadata-cache)
 
-(def cached-formats
-  "This is a set of formats that are cached."
+(defconfig non-cached-collection-metadata-formats
+  "Defines a set of collection metadata formats that will not be cached in memory"
+  {:default #{}
+   :type :edn})
+
+(def all-formats
+  "All the possible collection metadata formats that could be cached."
   #{:echo10
     :iso19115
     :dif

  (require [cmr.common.util :as u]
           [cmr.common.cache :as c]
           [cmr.common.xml :as cx]
           [cmr.common.config :refer [defconfig]]
           [cmr.common.jobs :refer [defjob]]
           [cmr.common.services.errors :as errors]

    ;; Note that when upgrading umm version we should also cache the previous version of UMM.
    {:format :umm-json
     :version umm-version/current-version}})

(defn cached-formats
  "This is a set of formats that are cached."
  []
  (set/difference all-formats (non-cached-collection-metadata-formats)))

;; Defines the record that represents the cache and implements the cache protocol. This is a very
;; simple implementation that just wraps an atom with the map of cached concept ids to revision
