Set expires header to given amount of seconds in the future.
@param response Response
@param seconds Seconds to expire
964448
public static void setExpiresSeconds(@NotNull HttpServletResponse response, int seconds) {
    Date expiresDate = DateUtils.addSeconds(new Date(), seconds);
    setExpires(response, expiresDate);
  }
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;
	}
11963
public function expire($key, $seconds) {
        return $this->getHandler($this->judge(__FUNCTION__))->expire($key, $seconds);
    }
1227871
public function setExpires(string $expires)
    {
        if (empty($expires)) {
            Throw new HeaderException('Empty expires is not allowed.');
        }

        $this->expires = $expires;
    }
413065
public static void setWriteTimeout(int seconds) throws AVException {
    if (seconds <= 0) {
      throw new AVException(new IllegalArgumentException("Timeout too small"));
    }
    if (seconds > 60 * 60) {
      throw new AVException(new IllegalArgumentException("Timeout too large"));
    }
    writeTimeout = seconds;
  }
16320
public function expire($key, $seconds, $inMillis = false) {
        $cmd = $inMillis ? 'pexpire' : 'expire';

        return $this->send([$cmd, $key, $seconds], function ($response) {
            return (bool) $response;
        });
    }
329877
protected final void assignCacheControlHeader(
			final HttpServletRequest request,
			final HttpServletResponse response, 
			final Object handler) {
		
		final CacheControl cacheControl = this.getCacheControl(request, response, handler);
		final String cacheControlHeader = this.createCacheControlHeader(cacheControl);
		
		if (cacheControlHeader != null) {
			response.setHeader(HEADER_CACHE_CONTROL, cacheControlHeader);
			if (useExpiresHeader) {
				response.setDateHeader(HEADER_EXPIRES, createExpiresHeader(cacheControl));
			}
		}
	}
554896
public function expire($key, $seconds)
    {
        $this->init();
        $result = $this->driver->expire($key, $seconds);
        return (bool)$result;
    }
728020
public function set($key, $response, $seconds)
	{
		return $this->memcached->set($key, $response, $seconds);
	}
1024634
function timeout(seconds) {
    return function timeoutSet(req, res, next) {
        const timeoutId = setTimeout(() => {
            if (!res.sent) res.sendStatus(504)
        }, 1000 * seconds);

        req.hook('response', Number.MAX_SAFE_INTEGER - 1000, function timeoutClear(req, res, next) {
            clearTimeout(timeoutId);
            next();
        });

        next();
    };
}
490496
void expireAfterAccess(String key, @Nullable String value) {
    requireArgument(expireAfterAccessDuration == UNSET_INT, "expireAfterAccess was already set");
    expireAfterAccessDuration = parseDuration(key, value);
    expireAfterAccessTimeUnit = parseTimeUnit(key, value);
  }
297700
def update_headers(self, response):
        
        if 'expires' in response.headers and 'cache-control' in response.headers:
            self.msg = self.server_cache_headers
            return response.headers
        else:
            self.msg = self.default_cache_vars
            date = parsedate(response.headers['date'])
            expires = datetime(*date[:6]) + timedelta(0, self.expire_after)
            response.headers.update({'expires': formatdate(calendar.timegm(expires.timetuple())),
                                'cache-control': 'public'})
            return response.headers
824903
private void setResponeHeaders(HttpServletResponse response) {

        response.setHeader("Cache-Control", "no-store, no-cache");
        response.setHeader("Pragma", "no-cache");
        response.setDateHeader("Expires", System.currentTimeMillis());
        response.setContentType("text/plain; charset=utf-8");
        response.setCharacterEncoding("utf-8");
    }
47296
public void setResponse(String response) {
		this.response = response;
		try {
			this.responseLength = response.getBytes("UTF-8").length;
		} catch (UnsupportedEncodingException e) {
			this.responseLength = response.length();
		}
	}
560231
public function expiresIn( int $seconds ) : Token
	{
		if ( $seconds > 0 )
		{
			$this->expiry = new DateTimeImmutable( sprintf( '+%d seconds', $seconds ) );

			return $this;
		}

		throw (new InvalidExpiryInterval())->withSeconds( $seconds );
	}
344089
public static void setDefaultSecurityHeaders(final WebResponse response)
	{
		// Category: Framing
		WicketComponentExtensions.setSecurityFramingHeaders(response);
		// Category: Transport
		WicketComponentExtensions.setSecurityTransportHeaders(response);
		// Category: XSS
		WicketComponentExtensions.setSecurityXSSHeaders(response);
		// Category: Caching
		WicketComponentExtensions.setSecurityCachingHeaders(response);
	}
744612
public function & SetExpirationSeconds ($seconds = 0) {
		/** @var $this \MvcCore\Session */
		if ($seconds > 0) 
			static::$meta->expirations[$this->__name] = static::$sessionStartTime + $seconds;
		return $this;
	}