clear any expiration TTL set on the object

        :param name: str     the name of the redis key
        :return: Future()
559193
def persist(self, name):
        
        with self.pipe as pipe:
            return pipe.persist(self.redis_key(name))
44529
def clear_redis(self, variable, clear_type):
        
        if variable is None:
            return
        if variable in self._clear_redis_tracker:
            return
        if not re.match(self._vars_match, variable):
            return
        self.log.info('[{}] Deleting redis variable: {}.'.format(clear_type, variable))
        print('Clearing Variables: {}{}{}'.format(c.Style.BRIGHT, c.Fore.MAGENTA, variable))
        self.tcex.playbook.delete(variable)
        self._clear_redis_tracker.append(variable)
131622
def _clear(self, pipe=None):
        
        redis = self.redis if pipe is None else pipe
        redis.delete(self.key)
692797
def clear_all_expired()
      t = Time.now
      return if t < @next_expiration && ! @cache.any? {|name, _| @cache_expiration_service.expired?(name.to_sym) }
      to_expire = @cache.select { |name, entry| entry.expires < t || @cache_expiration_service.expired?(name.to_sym) }
      to_expire.each do |name, entry|
        Puppet.debug {"Evicting cache entry for environment '#{name}'"}
        @cache_expiration_service.evicted(name)
        clear(name)
        @expirations.delete(entry.expires)
        Puppet.settings.clear_environment_settings(name)
      end
      @next_expiration = @expirations.first || END_OF_TIME
    end
251821
def ttl(self, key, **opts):
        """"""
        key, store = self._expand_opts(key, opts)
        if hasattr(store, 'ttl'):
            return store.ttl(key)
        data = store.get(key)
        if data is None:
            return None
        expiry = data[EXPIRY_INDEX]
        if expiry is not None:
            return max(0, expiry - time()) or None
566850
def delete_expired_locks(self):
        
        ttl_seconds = self.get_mutex_ttl_seconds()
        if ttl_seconds is not None:
            DBMutex.objects.filter(creation_time__lte=timezone.now() - timedelta(seconds=ttl_seconds)).delete()
1274193
def touch(self):
        
        marker_key = self.marker_key()
        self.redis_client.hset(marker_key, 'update_id', self.update_id)
        self.redis_client.hset(marker_key, 'date', datetime.datetime.now())

        if self.expire is not None:
            self.redis_client.expire(marker_key, self.expire)
702577
def expire(key, seconds, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.expire(key, seconds)
414383
def delete(self, name):
    '''
    
    '''
    keys = self._client.keys('%s%s:*'%(self._prefix,name))

    pipe = self._client.pipeline(transaction=False)
    for key in keys:
      pipe.delete( key )
    pipe.execute()

    # Could be not technically the exact number of keys deleted, but is a close
    # enough approximation
    return len(keys)
718776
def _run_expiration(self, conn):
        """"""
        # The logic here is sufficiently complicated, and we need
        # enough random keys (Redis documentation strongly encourages
        # not constructing key names in scripts) that we'll need to
        # do this in multiple steps.  This means that, when we do
        # go in and actually expire things, we need to first check
        # that they're still running.

        # Get, and clear out, the list of expiring items
        now = time.time()
        script = conn.register_script("""
        local result = redis.call("zrangebyscore", KEYS[1], 0, ARGV[1])
        redis.call("zremrangebyscore", KEYS[1], 0, ARGV[1])
        return result
        """)
        expiring = script(keys=[self._key_expiration()], args=[time.time()])
        
        # Manually expire each item one by one
        script = conn.register_script("""
        -- item may have fallen out of the worker list, if someone finished
        -- at just the very last possible moment (phew!)
        local wworker = redis.call("hget", KEYS[3], "i" .. ARGV[1])
        if not wworker then return end

        -- we want to return item, plus everything it's reserved
        local to_return = redis.call("smembers", KEYS[4])
        to_return[#to_return + 1] = ARGV[1]
        for i = 1, #to_return do
          local pri = redis.call("hget", KEYS[2], to_return[i])
          redis.call("zadd", KEYS[1], pri, to_return[i])
        end
        -- already removed from expiration list
        -- remove from worker list too
        redis.call("hdel", KEYS[3], "i" .. ARGV[1])
        redis.call("hdel", KEYS[3], wworker)
        """)
        for item in expiring:
            script(keys=[self._key_available(), self._key_priorities(),
                         self._key_workers(), self._key_reservations(item)],
                   args=[item])
456499
def ttl(key)
      validate_key(key)

      Result.new {
        GitHub::SQL.value(<<-SQL, :key => key, :connection => connection)
          SELECT expires_at FROM key_values
          WHERE `key` = :key AND (expires_at IS NULL OR expires_at > NOW())
        SQL
      }
    end
209729
def strlen(self, name):
        
        with self.pipe as pipe:
            return pipe.strlen(self.redis_key(name))
62899
def expire_cache(fragment_name, *args):
    
    cache_key = make_template_fragment_key(fragment_name, args)
    cache.delete(cache_key)
805990
def llen(self, name):
        
        with self.pipe as pipe:
            return pipe.llen(self.redis_key(name))
1302113
def expires(self):
        
        not_after = self._cert.get_notAfter().decode('ascii')
        return datetime.datetime.strptime(not_after, '%Y%m%d%H%M%SZ').replace(
            tzinfo=datetime.timezone.utc)
386896
def pexpireat(self, name, when):
        
        with self.pipe as pipe:
            return pipe.pexpireat(self.redis_key(name), when)
1025509
def forget(self, key):
        
        return bool(self._redis.delete(self._prefix + key))