Package com.opensymphony.oscache.base

Examples of com.opensymphony.oscache.base.Cache


                                                     DEFAULT_CACHESIZE );
        }

        if( cacheSize > 0 )
        {
            m_documentCache = new Cache(true,false,false,false,
                                        OSCACHE_ALGORITHM,
                                        cacheSize);
        }
        else
        {
View Full Code Here


                                                    PROP_CACHECAPACITY,
                                                    DEFAULT_CACHECAPACITY );

        log.debug("Cache capacity "+capacity+" pages.");

        m_cache = new Cache( true, false, false );

        //
        //  OSCache documentation sucks big time.  The clazz-parameter is completely
        //  undefined; I had to read the source code to figure out that you need
        //  to declare what type of a listener you are adding by sending the type
        //  of the interface.
        //
        m_cache.addCacheEventListener( m_allCollector, CacheEntryEventListener.class );

        //
        //  FIXME: There's an interesting issue here... It would probably be
        //  possible to DOS a JSPWiki instance by bombarding it with names that
        //  do not exist, as they would fill the negcache.  Will need to
        //  think about this some more...
        //
        m_negCache = new Cache( true, false, false );

        m_textCache = new Cache( true, false, false,
                                 false,
                                 OSCACHE_ALGORITHM,
                                 capacity );

        m_historyCache = new Cache( true, false, false, false,
                                    OSCACHE_ALGORITHM,
                                    capacity );

        //
        //  Find and initialize real provider.
View Full Code Here

        log.info("Initing CachingAttachmentProvider");

        //
        // Construct an unlimited cache of Collection objects
        //
        m_cache = new Cache( true, false, true );

        //
        // Construct an unlimited cache for the individual Attachment objects.
        // Attachment name is key, the Attachment object is the cached object
        //
        m_attCache = new Cache(true, false, true);
        m_attCache.addCacheEventListener(m_allCollector,CacheEntryEventListener.class);

        //
        //  Find and initialize real provider.
        //
View Full Code Here

      if(returnValue != null)
        return returnValue;

    ServletCacheAdministrator servletCacheAdministrator = ServletCacheAdministrator.getInstance(ActionContext.getServletContext());
    servletCacheAdministrator.flushAll();
    Cache cache = servletCacheAdministrator.getAppScopeCache(ActionContext.getServletContext());
   
    OSCacheUtility.clear(cache);
   
    return "cleared";
  }
View Full Code Here

TOP

Related Classes of com.opensymphony.oscache.base.Cache

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.