 
     # use cache for search result
     currentTime = new Date
-    if @searchResultCache[cacheKey] && @searchResultCache[cacheKey].time > currentTime.setSeconds(currentTime.getSeconds() - 20)
-      render(@searchResultCache[cacheKey].result)
+    if @searchResultCacheByKey[cacheKey] && @searchResultCacheByKey[cacheKey].time > currentTime.setSeconds(currentTime.getSeconds() - 20)
+      @renderTry(render, @searchResultCacheByKey[cacheKey].result, cacheKey)
       return
 
     App.Ajax.request(

          else
            App.Log.error('_globalSearchSingleton', "No such model App.#{item.type}")

        diff = false
        if @searchResultCache[cacheKey]
          diff = difference(@searchResultCache[cacheKey].resultRaw, data.result)

        # cache search result
        @searchResultCache[cacheKey] =
          result: result
          resultRaw: data.result
          limit: limit
          time: new Date

        # if result hasn't changed, do not rerender
        return if diff isnt false && _.isEmpty(diff)

        render(result)
    )

class _globalSearchSingleton extends Spine.Module

  constructor: ->
    @searchResultCache = undefined
    @searchResultCacheByKey = {}
    @apiPath = App.Config.get('api_path')

  execute: (params) ->
