code: function cacheQueryResult (cached) {
      // list of ids that where not cached
      this.uncachedIds = []
      // check result set for uncached ids
      for (var i=0; i < this.numIds; i++) {
          var cachedValue = undefined
          // decode result if not null
          if (cached[i] !== null) {
              try {
                  // decode JSON
                  cachedValue = JSON.parse(cached[i])
                  // add cached view flag
                  cachedValue._cachedView = true
              }
              catch (err) {
                  // ignore errors
              }
          }
          // if there is cached value use otherwise add id to fetch list
          defined(cachedValue)
              ? this.cached.push(cachedValue)
              : this.uncachedIds.push(this.ids[i])
      }
      // debug
      debug('view:id:record:uncachedIds', this.uncachedIds)
      // if all records were cached the return result from cache
      if (this.uncachedIds.length === 0) {
          // set cached view flag
          this.cached._cachedView = true
          // return cached results
          return this.cached
      }
      // load uncached records and return all
      else {
          return this.loadUncached()
      }
  }
docs: @function cacheQuery
  
  @param {array} cached
  
  @returns {Promise}