       else if @maxAge > 0
         item.expires = Date.now() + @maxAge
       event = 'update'
+      if @_lruQueue
+        @_lruQueue.use(item)
     else
       event = 'add'
       if expires > 0

      else if @maxAge > 0
        expires = Date.now() + @maxAge
      else expires = undefined
      item = new LRUCacheItem(id, value, null, expires)
      @_cacheLRU[id] = item
    if @_lruQueue
      delId = @_lruQueue.hit(id)
      @del(delId) if delId isnt undefined
    @emit(event, id, value, oldValue)
  clear: ->
    oldCache      = @_cacheLRU

  # thisArg: Value to use as this when executing callback.
  forEach: (callback, thisArg)->
    setImmediate @clearExpires if @cleanInterval > 0 and Date.now() - @lastCleanTime >= @cleanInterval
    thisArg ||= this
    if @_lruQueue
      @_lruQueue.forEach (item)->
        callback.call thisArg, item.value, item.id, this if not @isExpired item
      , this
    else
      for k,item of @_cacheLRU
        callback.call thisArg, item.value, k, @ if not @isExpired item
    return
  clearExpires: ->
    for k,v of @_cacheLRU
