   (stl-cache/create-single-thread-lookup-cache
     (consistent-cache/create-consistent-cache {:hash-timeout-seconds (enabled-cache-time-seconds)})))
 
-; (defn expire-consistent-cache-hashes
-;   "Forces the cached hash codes of a consistent cache to expire so that subsequent requests for
-;    enabled state will check cubby for consistency."
-;   [context]
-;   (let [cache (cache/context->cache context enabled-cache-key)]
-;     (consistent-cache/expire-hash-cache-timeouts (:delegate-cache cache))))
-
 (defn service-disabled-message
   "Creates a message indicating that the given service is disabled."
   [service]

  (if-let [cache (cache/context->cache context enabled-cache-key)]
    (do (cache/set-value cache enabled-cache-key true)
        ;; (expire-consistent-cache-hashes context)
        {:status 200 
         :headers {"Content-Type" (mt/with-utf-8 mt/json)}
         :body (json/generate-string "Application successfully enabled.")})
    (do
      (error "Application enabled state is not being cached. Could not enable application.")
      {:statud 500 
       :headers {"Content-Type" (mt/with-utf-8 mt/json)}
       :body (json/generate-string "'Enabled' cache is not available.")})))


  (if-let [cache (cache/context->cache context enabled-cache-key)]
    (do (cache/set-value cache enabled-cache-key false)
        ;; (expire-consistent-cache-hashes context)
        {:status 200
         :headers {"Content-Type" (mt/with-utf-8 mt/json)}
         :body (json/generate-string "Application successfully disabled.")})
    (do
      (error "Application enabled state is not being cached. Could not disable application.")
      {:status 500
       :headers {"Content-Type" (mt/with-utf-8 mt/json)}
       :body (json/generate-string "'Enabled' cache is not available.")})))

