title: How to destroy all sessions in Symfony 2
body: <h1>Update</h1>
  
  <p>After detailed investigation and consultation with some experts, it occurred to me, that idea of <strong>destroying sessions</strong> is an incorrect one. The better question would be — «How to force all users to log out».</p>
  
  <p>And this problem should be solved not from the session perspective, which is a pretty low-level mechanism, but from the Security Component one. Even if you delete all session data, it will be re-created by means of <code>remember me</code> cookies with the next user requests.</p>
  
  <p>I will try to present the valid solution to this problem later on.</p>
  
  <h1>The question</h1>
  
  <p>I need to implement a feature of so-called application «lockdown», so I need a way to log all users out of Symfony 2 application (close all active sessions).</p>
  
  <p>What is the best way to achieve this functionality?</p>
  
  <p>Ideally, the solution should be fully compatible with all possible <a href="http://symfony.com/doc/current/components/http_foundation/session_configuration.html#save-handlers" rel="nofollow">save-handlers</a>.</p>
  
  <p>It looks like <code>SessionHandlerInterface</code> doesn't provide a method to do so.</p>