Configures expire after access.
490496
void expireAfterAccess(String key, @Nullable String value) {
    requireArgument(expireAfterAccessDuration == UNSET_INT, "expireAfterAccess was already set");
    expireAfterAccessDuration = parseDuration(key, value);
    expireAfterAccessTimeUnit = parseTimeUnit(key, value);
  }
296951
public void setExpireTime(long expireTime) {
		// if expire time was <= 0 and is now greater, fill expire table now
		if (this.expireTime <= 0 && expireTime > 0) {
			long currentTime = System.currentTimeMillis();
			Iterator values = cacheLineTable.values().iterator();

			while (values.hasNext()) {
				CacheLine line = (CacheLine) values.next();

				line.setLoadTime(currentTime);
			}
		} else if (this.expireTime <= 0 && expireTime > 0) {// if expire time
			// was > 0 and is
			// now <=, do
			// nothing, just
			// leave the load
			// times in place,
			// won't hurt
			// anything...
		}

		this.expireTime = expireTime;
	}
1202885
def expire_key(self, key):
        '''
        
        '''
        value = self.base_dict[key]
        del self[key]
        if self.callback is not None:
            self.callback(
                key, value, *self.callback_args, **self.callback_kwargs)
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)
466428
def _update_session_expiration(self):
        

        session_time = oz.settings["session_time"]

        if session_time:
            self.redis().expire(self._session_key, session_time)
824766
def _expire_data(self):
        
        expire_time_stamp = time.time() - self.expire_time
        self.timed_data   = {d: t for d, t in self.timed_data.items()
                             if t > expire_time_stamp}
531247
private final void setExpiration(long expirationInMinutes) {
	expirationInMilliseconds = System.currentTimeMillis()+ expirationInMinutes * 60 * 1000;
        signature = null;
        if (userData != null) {
            encryptedBytes = null;
            userData.addAttribute("expire", Long.toString(expirationInMilliseconds));
        } else {
            encryptedBytes = null;
        }
    }
479865
@GuardedBy("evictionLock")
  void expireAfterAccessEntries(long now) {
    if (!expiresAfterAccess()) {
      return;
    }

    expireAfterAccessEntries(accessOrderWindowDeque(), now);
    if (evicts()) {
      expireAfterAccessEntries(accessOrderProbationDeque(), now);
      expireAfterAccessEntries(accessOrderProtectedDeque(), now);
    }
  }
792620
def expire_at(time)
      time = (time.to_f * 1000).floor
      return coerce_bool(self.connection.pexpireat(@key, time))
    end
713471
def expired(self):
    """"""
    expiry_time = self.expiry_time
    if expiry_time is not None:
      return expiry_time < rdfvalue.RDFDatetime.Now()
    else:
      return False
169858
def _allow_custom_expire(self, load):
        '''
        
        '''
        expire_override = self.opts.get('token_expire_user_override', False)

        if expire_override is True:
            return True

        if isinstance(expire_override, collections.Mapping):
            expire_whitelist = expire_override.get(load['eauth'], [])
            if isinstance(expire_whitelist, collections.Iterable):
                if load.get('username') in expire_whitelist:
                    return True

        return False
1227871
public function setExpires(string $expires)
    {
        if (empty($expires)) {
            Throw new HeaderException('Empty expires is not allowed.');
        }

        $this->expires = $expires;
    }
948086
private void applyExpire(ExpireOperation operation) {
    context.setTimestamp(operation.timestamp());
    PrimaryBackupSession session = context.getSession(operation.session());
    if (session != null) {
      context.expireSession(session.sessionId().id());
    }
  }
729337
def expiring_url(object_key, temp_url_key, expires_at = Time.now.to_i + 60)
      temp_url(object_key, temp_url_key, expires_at)
    end
949313
def set_cache_expiry(response):
    
    if response.cache_control.max_age is None and 'CACHE_DEFAULT_TIMEOUT' in config.cache:
        response.cache_control.max_age = config.cache['CACHE_DEFAULT_TIMEOUT']
    return response
883973
private void setupExpiryPolicy() {
    if (cache2kConfiguration.getExpiryPolicy() != null) {
      org.cache2k.expiry.ExpiryPolicy<K, V> ep0;
      try {
        ep0 = cache2kConfiguration.getExpiryPolicy().supply(manager.getCache2kManager());
      } catch (Exception ex) {
        throw new CacheException("couldn't initialize expiry policy", ex);
      }
      final org.cache2k.expiry.ExpiryPolicy<K, V> ep = ep0;
      cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(
        new org.cache2k.expiry.ExpiryPolicy<K, V>() {
        @Override
        public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
          if (value == null) {
            return NO_CACHE;
          }
          return ep.calculateExpiryTime(key, value, loadTime, oldEntry);
        }
      }));
      return;
    }
    if (config.getExpiryPolicyFactory() != null) {
      expiryPolicy = config.getExpiryPolicyFactory().create();
    }
    if (expiryPolicy == null || expiryPolicy instanceof EternalExpiryPolicy) {
      cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new org.cache2k.expiry.ExpiryPolicy<K, V>() {
        @Override
        public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
          if (value == null) {
            return NO_CACHE;
          }
          return ETERNAL;
        }
      }));
      return;
    }
    if (expiryPolicy instanceof ModifiedExpiryPolicy) {
      Duration d = expiryPolicy.getExpiryForCreation();
      final long _millisDuration = d.getTimeUnit().toMillis(d.getDurationAmount());
      if (_millisDuration == 0) {
        cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new org.cache2k.expiry.ExpiryPolicy<K, V>() {
          @Override
          public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
            return NO_CACHE;
          }
        }));
        return;
      }
      cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new org.cache2k.expiry.ExpiryPolicy<K, V>() {
        @Override
        public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
          if (value == null) {
            return NO_CACHE;
          }
          return loadTime + _millisDuration;
        }
      }));
      return;
    }
    if (expiryPolicy instanceof CreatedExpiryPolicy) {
      cache2kConfiguration.setEternal(true);
      Duration d = expiryPolicy.getExpiryForCreation();
      final long _millisDuration = d.getTimeUnit().toMillis(d.getDurationAmount());
      if (_millisDuration == 0) {
        cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new org.cache2k.expiry.ExpiryPolicy<K, V>() {
          @Override
          public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
            return NO_CACHE;
          }
        }));
        return;
      }
      cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new org.cache2k.expiry.ExpiryPolicy<K, V>() {
        @Override
        public long calculateExpiryTime(final K key, final V value, final long loadTime, final CacheEntry<K, V> oldEntry) {
          if (value == null) {
            return NO_CACHE;
          }
          if (oldEntry == null) {
            return loadTime + _millisDuration;
          } else {
            return NEUTRAL;
          }
        }
      }));
      return;
    }
    needsTouchyWrapper = true;
    cache2kConfiguration.setExpiryPolicy(new CustomizationReferenceSupplier<org.cache2k.expiry.ExpiryPolicy<K, V>>(new TouchyJCacheAdapter.ExpiryPolicyAdapter<K,V>(expiryPolicy)));
  }
835465
public void expire() {
        synchronized (this) {
            expired = true;
        }
        int i = loadCount.get();
        debug(String.format("expire jar provider loader for: %s (loadCount: %d)", pluginJar, i));
        if (i <= 0) {
            try {
                close();
            } catch (IOException e) {

            }
        }
    }