Fill the result cache with all results.
501365
def _fill_result_cache(self):
        

        idx = 0
        try:
            while True:
                idx += 1000
                self._fill_result_cache_to_idx(idx)
        except StopIteration:
            pass

        self._count = len(self._result_cache)
1146839
def store(self, completed_task, resultsdir):
        """"""

        with working_directory(resultsdir):
            _logger.info('storing result')
            return completed_task.store(self)
273936
def set_result(self, result):
        
        self._result = result
        self._state = self.FINISHED
1292784
def find_all(self, cls):
        """"""
        final_results = []
        table = self.get_class_table(cls)
        for db_result in table.scan():
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
90722
public void clearCachedResult() {
    conditions.assembleParameters();
    Map<String, String> query = conditions.getParameters();
    String cacheKey = QueryResultCache.generateKeyForQueryCondition(getClassName(), query);
    QueryResultCache.getInstance().clearCachedFile(cacheKey);
  }
612107
def _prepare_results(self, results):
        
        # if we want a result sorted by a score, and if we have a full result
        # (no slice), we can do it know, by creating keys for each values with
        # the sorted set score, and sort on them
        if self._sort_by_sortedset_after and (len(results) > 1 or self._values):
            conn = self.cls.get_connection()

            sort_params = {}
            base_tmp_key, tmp_keys = self._prepare_sort_by_score(results, sort_params)

            # compose the set to sort
            final_set = '%s_final_set' % base_tmp_key
            conn.sadd(final_set, *results)

            # apply the sort
            results = conn.sort(final_set, **sort_params)

            # finally delete all temporary keys
            conn.delete(*(tmp_keys + [final_set, base_tmp_key]))

        if self._store:
            # if store, redis doesn't return result, so don't return anything here
            return

        if self._values and self._values['mode'] != 'flat':
            results = self._to_values(results)

        return super(ExtendedCollectionManager, self)._prepare_results(results)
14481
def fetchall(self):
        """"""
        self._check_executed()
        if self._rows is None:
            return ()
        if self.rownumber:
            result = self._rows[self.rownumber:]
        else:
            result = self._rows
        self.rownumber = len(self._rows)
        return result
499249
def get_all(self, path, data=None, limit=100):
        """"""
        return ListResultSet(path=path, data=data or {}, limit=limit)
162132
def _fill_buffer(self):
        
        # If we cannot fetch anymore from the server then we're done here.
        if self._all_results_fetched:
            self._eof()

        raw_results = self.result_fetcher(page=self._page, per_page=self.per_page)

        entities = []
        for raw in raw_results:
            entities.append(self.entity.deserialize(raw, bind_client=self.bind_client))

        self._buffer = collections.deque(entities)

        self.log.debug("Requested page {0} (got: {1} items)".format(self._page,
                                                                    len(self._buffer)))
        if len(self._buffer) < self.per_page:
            self._all_results_fetched = True

        self._page += 1
118010
private synchronized boolean loadNextResults() {
        if ( atEndOfResults() )
            return false;

        do {
            nextResults.addAll(fetchNextPage());
        } while ( !atEndOfResults() && nextResults.isEmpty() );

        return !nextResults.isEmpty();
    }
764446
public function fetchAll() {
    if (!empty($this->delayed_results)) {
      $result = $this->delayed_results;
      $this->delayed_results = array();
      return $result;
    } else {
      return false;
    }
  }
276677
def add_result(self, key, result):
        
        if len(self.cache) > self.max_size:
            return
        if key is not None:
            self.cache[key] = result
938876
def fetchAll(self, rawResults = False, **queryArgs) :
        """"""
        return self.simpleQuery('all', rawResults = rawResults, **queryArgs)
196974
def _fill_cache(self, namespace):
        """"""

        modules = self._findPluginModules(namespace)

        self._cache = list(modules)
306964
function cacheResults (results) {
    // get current max record number
    return this.cache.model.maxRecordNumber({
        session: this.query.session,
    }).then(n => {
        // if state has changed do not cache
        if (n !== this.initialMaxRecordNumber) {
            return
        }
        // JSON encode data to cache
        try {
            var cacheValue = JSON.stringify({
                n: n,
                v: results,
            })
        }
        catch (err) {
            // ignore errors
        }
        // cache result
        if (cacheValue) {
            debug('view:select:collection:set', this.selectCacheKey)
            return this.cache.redis.setAsync(this.selectCacheKey, cacheValue)
        }
    })
}
930305
protected function populateResult()
    {
        // default: mark that the processor completed succesfully
        $this->result->setSuccess(true);

        // store output array in result data
        $this->result->output = $this->context->output;
    }
547566
def addPendingResult( self, ps, jobid ):
        """"""
        k = self._parametersAsIndex(ps)

        # retrieve or create the result list
        if k in self._results.keys():
            rs = self._results[k]
        else:
            rs = []
            self._results[k] = rs

        # append the pending result's jobid
        rs.insert(0, jobid)

        # map job id to parameters to which it refers
        self._pending[jobid] = k