Expire all the objects with the key having a given prefix.
551102
def ExpirePrefix(self, prefix):
    """"""
    for key in list(self._hash):
      if key.startswith(prefix):
        self.ExpireObject(key)
1188135
def delete(key, options = {})
      return super if options.include?(:raw)
      value, expires = super
      value if !expires || Time.now <= Time.at(expires)
    end
10644
function(key, value, delay){
            $ExpressSESSION.session.store[key] = value;
            if(delay && is_number(delay) && delay > 0){
                var vkey = self.id()+'_'+key;
                if($ExpressSESSION.session.expires[key]) clearTimeout(sesssion_expires[vkey]);
                sesssion_expires[vkey] = setTimeout(function(){
                    self.forget(key);
                    delete sesssion_expires[vkey];
                    delete $ExpressSESSION.session.expires[key];
                }, delay);
            }
        }
183541
protected function expire($key = array(), $ttl = 0)
    {
        if ($ttl === 0) {
            // when storing indefinitely, there's no point in keeping it around,
            // it won't just expire
            return;
        }

        // $key can be both string (1 key) or array (multiple)
        $keys = (array) $key;

        $time = time() + $ttl;
        foreach ($keys as $key) {
            $this->expires[$key] = $time;
        }
    }
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
718448
def expire(self, key, max_age, **opts):
        """"""
        self.expire_at(key, time() + max_age, **opts)
17002
def cache_incr(self, key):
        
        cache.set(key, cache.get(key, 0) + 1, self.expire_after())
513005
def expire_cached_json
      all_json_properties.each do |properties|
        [true, false].each do |is_top_level_json|
          all_json_versions.each do |version|
            Mongoid::CachedJson.config.cache.delete(self.class.cached_json_key({
                                                                                 properties: properties,
                                                                                 is_top_level_json: is_top_level_json,
                                                                                 version: version
                                                                               }, self.class, id))
          end
        end
      end
    end
940889
def ExpireRegEx(self, regex):
    """"""
    reg = re.compile(regex)
    for key in list(self._hash):
      if reg.match(key):
        self.ExpireObject(key)
140016
def discard_last(self, indices):
        """"""
        for i in indices:
            self.buffer_expire[i] = self.buffer_expire[i][:-1]
            self.buffer[i] = self.buffer[i][:-1]
670546
private function setExpires(Memento\Key $key, $expires)
    {
        if (is_null($expires) || !is_integer($expires)) {
            return;
        }
        $this->__connect($key);

        $expiresKey = $this->groupKey ? $this->groupKey : $key;

        return $this->redis->expire($expiresKey->getKey(), $expires);
    }
523370
public function expireAll()
    {
        if (!$this->enabled)
            return true;

        $this->Logger->debug('Expire all keys');

        $apcMethod = $this->apcFuncPrefix.'_clear_cache';
        $apcMethod();

        return $apcMethod('user');
    }
1234261
def _expire(self):
        
        del self.map.addr[self.name]
        self.map.notify("addrmap_expired", *[self.name], **{})
297544
def prefix(self, keys):
        
        assert isinstance(keys, tuple)

        self._prefix = keys
        self._load_prefix_binding()
629641
@GuardedBy("evictionLock")
  void expireAfterAccessEntries(AccessOrderDeque<Node<K, V>> accessOrderDeque, long now) {
    long duration = expiresAfterAccessNanos();
    for (;;) {
      Node<K, V> node = accessOrderDeque.peekFirst();
      if ((node == null) || ((now - node.getAccessTime()) < duration)) {
        return;
      }
      evictEntry(node, RemovalCause.EXPIRED, now);
    }
  }
860196
def clear(self):
        """"""
        for k in list(self.keys()):
            if k not in self.extrakeys:
                del self[k]
531492
function expunge()
    {
        if ($this->type == 'db' && $this->db && $this->ttl) {
            $this->db->query(
                "DELETE FROM {$this->table}"
                . " WHERE `cache_key` LIKE ?"
                . " AND `expires` < " . $this->db->now(),
                $this->prefix . '.%');
        }
    }