Package org.apache.shiro.cache

Examples of org.apache.shiro.cache.MemoryConstrainedCacheManager


        sm.setSubjectDAO(subjectDAO);

        final DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sm.getSessionManager();
        defaultSessionManager.setSessionDAO(mongoDbSessionDAO);
        defaultSessionManager.setDeleteInvalidSessions(true);
        defaultSessionManager.setCacheManager(new MemoryConstrainedCacheManager());
        // DO NOT USE global session timeout!!! It's fucky.
        //defaultSessionManager.setGlobalSessionTimeout(TimeUnit.SECONDS.toMillis(5));

        SecurityUtils.setSecurityManager(sm);
    }
View Full Code Here


    @Override
    protected void onInit() {
        super.onInit();
        securityDataProvider = BeanManagerProvider.getInstance().getContextualReference(SecurityDataProvider.class);
        setCacheManager(new MemoryConstrainedCacheManager());
        setCachingEnabled(true);
    }
View Full Code Here

  public SillyRealm()
  {
    log.info("constructor...");
   
    // Only do authentication once for each request
    this.setCacheManager( new MemoryConstrainedCacheManager() );
  }
View Full Code Here

  public SillyRealm()
  {
    log.info("constructor...");

    // Only do authentication once for each request
    setCacheManager(new MemoryConstrainedCacheManager());
  }
View Full Code Here

TOP

Related Classes of org.apache.shiro.cache.MemoryConstrainedCacheManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.