Invalidate all sessions that have expired.
178185
public void processExpires() {

    long timeNow = System.currentTimeMillis();
    InternalSession sessions[] = findSessions();
    int expireHere = 0 ;

    if(log.isDebugEnabled())
      log.debug("Start expire sessions {} at {} sessioncount {}", getName(), timeNow, sessions.length);
    for (int i = 0; i < sessions.length; i++) {
      if (sessions[i]!=null && !sessions[i].isValid()) {
        expireHere++;
      }
    }
    long timeEnd = System.currentTimeMillis();
    if(log.isDebugEnabled())
      log.debug("End expire sessions {} processingTime {} expired sessions: {}", getName(), timeEnd - timeNow, expireHere);
    processingTime += ( timeEnd - timeNow );

  }
585596
public void invalidate ()
  {
    if (m_bInvalidated)
      throw new IllegalArgumentException ("Servlet pool already invalidated!");
    m_bInvalidated = true;

    // Destroy all servlets
    for (final ServletItem aServletItem : m_aServlets)
      try
      {
        aServletItem.getServlet ().destroy ();
      }
      catch (final Exception ex)
      {
        if (LOGGER.isErrorEnabled ())
          LOGGER.error ("Failed to destroy servlet " + aServletItem, ex);
      }

    m_aServlets.clear ();
  }
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]
279321
public void sessionExpiryTimeSet(ISession session, long old, long newone) {
        // ArrayList sessionStateObservers = null;

        /*
         * Check to see if there is a non-empty list of sessionStateObservers.
         */
        if (_sessionStateObservers == null || _sessionStateObservers.size() < 1) {
            return;
        }

        // synchronized(_sessionStateObservers) {
        // sessionStateObservers = (ArrayList)_sessionStateObservers.clone();
        // }

        ISessionStateObserver sessionStateObserver = null;
        for (int i = 0; i < _sessionStateObservers.size(); i++) {
            sessionStateObserver = (ISessionStateObserver) _sessionStateObservers.get(i);
            sessionStateObserver.sessionExpiryTimeSet(session, old, newone);
        }
    }
1046062
def invalidate(*tables, **kwargs):
    """"""
    backend = get_backend()
    db = kwargs.get('using', 'default')

    if backend._patched:
        for t in map(resolve_table, tables):
            backend.keyhandler.invalidate_table(t, db)
28172
@Override
    @Scheduled(fixedRate = REAP_INTERVAL)
    public void removeExpired() {
        final Set<String> reapable = sessions.entrySet().stream()
                .filter(e -> e.getValue().getExpires().isPresent())
                .filter(e -> e.getValue().getExpires().get().isBefore(now()))
                .map(Map.Entry::getKey).collect(toSet());
        reapable.forEach(key -> {
            final FedoraSession s = sessions.get(key);
            if (s != null) {
                try {
                    s.expire();
                } catch (final RepositoryRuntimeException e) {
                    LOGGER.error("Got exception rolling back expired session {}: {}", s, e.getMessage());
                }
            }
            sessions.remove(key);
        });
    }
874244
@Override
    public void invalidate() {
        // thread-safety on cache operations
        synchronized (requestCache) {
            requestCache = new HashMap<String, ResponseCtx>(CACHE_SIZE);
            requestCacheTimeTracker = new HashMap<String, Long>(CACHE_SIZE);
            requestCacheUsageTracker = new ArrayList<String>(CACHE_SIZE);
        }
    }
207679
def invalidate_all(self):
        ''''''

        LOG.debug('clearing cache')
        appcache = str(self.get_app_cache())
        for dirpath, dirnames, filenames in os.walk(appcache):
            for name in filenames:
                try:
                    pathlib.Path(dirpath, name).unlink()
                except OSError:
                    pass
223831
public static void clearInvalidSessions(final Principal user) {

		logger.info("Clearing invalid sessions for user {} ({})", user.getName(), user.getUuid());

		final PropertyKey<String[]> sessionIdKey = StructrApp.key(Principal.class, "sessionIds");
		final String[] sessionIds                = user.getProperty(sessionIdKey);

		if (sessionIds != null && sessionIds.length > 0) {

			final SessionCache sessionCache = Services.getInstance().getService(HttpService.class).getSessionCache();

			for (final String sessionId : sessionIds) {

				HttpSession session = null;
				try {
					session = sessionCache.get(sessionId);

				} catch (Exception ex) {
					logger.warn("Unable to retrieve session " + sessionId + " from session cache:", ex);
				}

				if (session == null || SessionHelper.isSessionTimedOut(session)) {
					SessionHelper.clearSession(sessionId);
				}
			}
		}
	}
76443
public function invalidate() {
		$this->incrementor = time();
		\wp_cache_set( $this->incrementor_key, $this->incrementor, $this->group, 0 );
	}
908774
public void invalidate() {

        // Close all associated tunnels, if possible
        for (GuacamoleTunnel tunnel : tunnels.values()) {
            try {
                tunnel.close();
            }
            catch (GuacamoleException e) {
                logger.debug("Unable to close tunnel.", e);
            }
        }

        // Invalidate all user contextx
        for (UserContext userContext : userContexts)
            userContext.invalidate();

        // Invalidate the authenticated user object
        authenticatedUser.invalidate();

    }
1115790
def expired(self):
        """"""
        self._data["_killed"] = True
        self.save()
        raise SessionExpired(self._config.expired_message)
602839
public function reset() {
		$ex = func_get_args();
		foreach($_SESSION as $n => $s) {
			if(!in_array($n,$ex)) unset($_SESSION[$n]);
		}
		if(empty($ex)) session_destroy();
	}
82527
public void expireSession(long sessionId) {
    PrimaryBackupSession session = sessions.remove(sessionId);
    if (session != null) {
      log.debug("Expiring session {}", session.sessionId());
      session.expire();
      service.expire(session.sessionId());
    }
  }
274137
public function destroy()
    {
        if ( NULL !== $this->sessionID )
        {
            session_write_close();
        }
        elseif ( NULL === $this->sessionID && $this->strict )
        {
            throw new InvalidSessionException( 'There is no session to close' );
        }
    }
642892
public function deleteExpiredBans(): void
    {
        $bans = Ban::query()
            ->where('expired_at', '<=', Carbon::now()->format('Y-m-d H:i:s'))
            ->get();

        $bans->each(function ($ban) {
            $ban->delete();
        });
    }
1055466
protected function invalidateSessions()
    {
        // Save the configuration that invalidates sessions
        $this->config->save(self::ITEM_SESSION_INVALIDATE, Carbon::now('utc')->getTimestamp());

        // Invalidate the current session explicitly so that we get back to the login page with a nice error message
        $this->app->make('session')->invalidate();
    }