title: Use of CachingAuthenticator in Dropwizard
body: <p>I want to discard old authentications from dropwizard, which is why I'm using blow configuration of CachingAuthenticator.</p>
  <pre><code>@Override 
  public void run(WebConfiguration configuration, Environment environment) {
     environment.jersey().register(new ActivityResource());
      
     CachingAuthenticator&lt;BasicCredentials, AuthUser&gt; cachingAuthenticator =
          new CachingAuthenticator&lt;&gt;(environment.metrics(), new WebAuthenticator(), 
                  configuration.getAuthenticationCachePolicy());
  }
  </code></pre>
  <p>Policy is in yml file as</p>
  <pre><code>authenticationCachePolicy: maximumSize=10, expireAfterAccess=1m
  </code></pre>
  <p>My questions are:</p>
  <ol>
  <li><p>how do I register(get it working) cachingAuthenticator so every request will be authenticated?</p>
  </li>
  <li><p>How to set expireAfterAccess in seconds?</p>
  </li>
  <li><p>Anything which is wrong in code, please suggest...</p>
  </li>
  </ol>