Return the specific cache key for the sql query described by the
        pieces of the query and the generation key.
517097
def sql_key(self, generation, sql, params, order, result_type,
                using='default'):
        
        # these keys will always look pretty opaque
        suffix = self.keygen.gen_key(sql, params, order, result_type)
        using = settings.DB_CACHE_KEYS[using]
        return '%s_%s_query_%s.%s' % (self.prefix, using, generation, suffix)
610774
private ConfigurationBuilder getQueryCacheConfig() {
      ConfigurationBuilder cfgBuilder = new ConfigurationBuilder();
      cfgBuilder
            .clustering().cacheMode(CacheMode.LOCAL)
            .transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL)
            .expiration().maxIdle(ENTRY_LIFESPAN, TimeUnit.SECONDS)
            .memory().evictionType(EvictionType.COUNT).size(MAX_ENTRIES);
      return cfgBuilder;
   }
391059
def cache_key(self, method_name):
        """"""
        key = ""
        method = getattr(self, "cache_key_{}".format(method_name), None)
        if method:
            key = method()

        return key
616434
def _cache_key(cmd_id):
        """"""
        return '{}__{}__{}__{}'.format(
            cmd_id.generationTime, cmd_id.origin, cmd_id.sequenceNumber,
            cmd_id.commandName)
485546
def keys(self):
        """"""
        return set(
            row[self._keycol] for row in self._connection.execute(
                """SELECT DISTINCT {} FROM {} ORDER BY {} ASC;""".format(
                    self.selkeycol,
                    self.table,
                    self._keycol
                )
            )
        )
326781
def get(ns, dburl=None):
    '''
    
    '''
    if dburl is None:
        dburl = DONES_DB_URL

    cache_key = (ns, dburl)
    if ns not in DONES_CACHE:
        dones_ns = 'dones_{}'.format(ns)
        DONES_CACHE[cache_key] = DbDones(ns=dones_ns, dburl=dburl)

    return DONES_CACHE[cache_key]
873738
protected function cacheKey(string $key_part): string
    {
        $key = md5('resolveAllUrls'.$key_part.self::SCHEMA_VERSION);

        return $key;
    }
13725
def _get_cache_plus_key(self):
        """"""
        key = getattr(self, '_cache_key', self.key_from_query())
        return self._cache.cache, key
966458
def get_cache(self, namespace, query_hash, length, start, end):
        """"""
        query = 'SELECT start, value FROM gauged_cache WHERE namespace = ? ' \
            'AND hash = ? AND length = ? AND start BETWEEN ? AND ?'
        cursor = self.cursor
        cursor.execute(query, (namespace, query_hash, length, start, end))
        return tuple(cursor.fetchall())
542143
def _get_cache_key(self):
        

        keys = list(self.params.keys())
        keys.sort()

        cache_key = str()

        for key in keys:
            if key != "api_sig" and key != "api_key" and key != "sk":
                cache_key += key + self.params[key]

        return hashlib.sha1(cache_key.encode("utf-8")).hexdigest()
617528
def key(self, *args, _prefix=None, **kwargs):
        
        if kwargs:
            raise NotImplementedError(
                'kwarg cache keys not implemented')
        return (_prefix,) + tuple(args)
27670
def gen_query(self):
        
        return (
            SQL.forwards_relation(self.src, self.rel) if self.dst is None else
            SQL.inverse_relation(self.dst, self.rel)
            )
992691
def QueryInfoKey(key):
  """"""
  regqueryinfokey = advapi32["RegQueryInfoKeyW"]
  regqueryinfokey.restype = ctypes.c_long
  regqueryinfokey.argtypes = [
      ctypes.c_void_p, ctypes.c_wchar_p, LPDWORD, LPDWORD, LPDWORD, LPDWORD,
      LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD,
      ctypes.POINTER(FileTime)
  ]

  null = LPDWORD()
  num_sub_keys = ctypes.wintypes.DWORD()
  num_values = ctypes.wintypes.DWORD()
  ft = FileTime()
  rc = regqueryinfokey(key.handle, ctypes.c_wchar_p(), null, null,
                       ctypes.byref(num_sub_keys), null, null,
                       ctypes.byref(num_values), null, null, null,
                       ctypes.byref(ft))
  if rc != ERROR_SUCCESS:
    raise ctypes.WinError(2)

  last_modified = ft.dwLowDateTime | (ft.dwHighDateTime << 32)
  last_modified = last_modified // 10000000 - WIN_UNIX_DIFF_MSECS

  return (num_sub_keys.value, num_values.value, last_modified)
589815
def get_sql(self):
        
        # reset arg index and args
        self.arg_index = 0
        self.args = {}

        # build the WHERE sql portion if needed
        if len(self.wheres):
            where = self.build_where_part(self.wheres)
            return 'WHERE {0} '.format(where)
        return ''
625003
def _get_code(self, key):
        

        data = self.grid.code_array(key)
        self.grid.code_array.result_cache.clear()

        return data
371175
function cacheQuery () {
    // debug
    debug('view:id:record:get', this.idCacheKeys, this.ids)
    // attempt to get from cache
    return this.cache.redis.mgetAsync(this.idCacheKeys)
    // check result
    .then(cached => this.cacheQueryResult(cached))
}
252952
protected function generateCacheKey()
    {
        $name = $this->connection->getName();

        $data = $name.$this->toSql().serialize($this->getBindings());

        return hash(static::HASH_ALGO, $data);
    }