title: MemoryStore leaking memory in SailsJs App
body: <p>A few days ago, I run SailsJs app for the first time in production. This warning showed up.</p>
  
  <pre><code>Warning: connection.session() MemoryStore is not
  designed for a production environment, as it will leak
  memory, and will not scale past a single process.
  </code></pre>
  
  <p>I understand that a similar <a href="https://stackoverflow.com/questions/10760620/using-memorystore-in-production">question</a> has been asked and the answer seems to be periodically cleaning up sessionStore with code like.</p>
  
  <pre><code>function sessionCleanup() {
     sessionStore.all(function(err, sessions) {
        for (var i = 0; i &lt; sessions.length; i++) {
           sessionStore.get(sessions[i], function() {} );
        }
     });
  }
  </code></pre>
  
  <p>How can I get reference to sessionStore in sails.js?</p>