def fetch(key, ttl=nil, options=nil)
      options = options.nil? ? CACHE_NILS : options.merge(CACHE_NILS) if @options[:cache_nils]
      val = get(key, options)
      not_found = @options[:cache_nils] ?
        val == Dalli::Server::NOT_FOUND :
        val.nil?
      if not_found && block_given?
        val = yield
        add(key, val, ttl_or_default(ttl), options)
      end
      val
    end
def fetch(key, ttl=nil, options=nil)
      options = options.nil? ? CACHE_NILS : options.merge(CACHE_NILS) if @options[:cache_nils]
      val = get(key, options)
      not_found = @options[:cache_nils] ?
        val == Dalli::Server::NOT_FOUND :
        val.nil?
      if not_found && block_given?
        val = yield
        add(key, val, ttl_or_default(ttl), options)
      end
      val
    end
Fetch the value associated with the key.
 If a value is found, then it is returned.

 If a value is not found and no block is given, then nil is returned.

 If a value is not found (or if the found value is nil and :cache_nils is false)
 and a block is given, the block will be invoked and its return value
 written to the cache and returned.