 
 
 class Cache extends Impromptu.Cacheable
+  @Error: CacheError
+
   key: ->
     parts = [@name]
 


      # Check if there's a process already running to update the cache.
      (exists, done) ->
        throw new CacheError() if exists
        client.get "lock-process:#{key}", done

      (pid, done) ->
        # If there's an update process, check that it's still running.
        throw new CacheError() if pid and processIsRunning pid

        # Time to update the cache.
        # Set the process lock.

            # Unset the lock process; the value has been updated.
            client.del "lock-process:#{key}", done
    ], (err, results) ->
      # If we catch a `CacheError`, the update sequence bailed;
      # set the result to `false`.
      if err and err instanceof CacheError
        return fn err, false

      # Otherwise, the update was successful if there was no error.
      fn err, !!err
