Package org.apache.cocoon.caching

Examples of org.apache.cocoon.caching.IdentifierCacheKey


            final String cacheKey = par.getParameter("cache-key");
       
            if ( cacheKey != null ) {
                Cache cache = null;

                IdentifierCacheKey key = new IdentifierCacheKey(cacheKey, true);
                try {
                    cache = (Cache)this.manager.lookup(cacheRole);
                    cache.remove(key);
               
                    key = new IdentifierCacheKey(cacheKey, false);
                    cache.remove(key);
                } catch (Exception ex) {
                    if (this.getLogger().isDebugEnabled()) {
                        getLogger().debug("Exception while trying to remove entry "+cacheKey+" from Cache with role " + cacheRole, ex);
                    }
View Full Code Here


       
        // prepare the pipeline
        super.preparePipeline( environment );

        // and now prepare the caching information
        this.cacheKey = new IdentifierCacheKey(key,
                                           this.serializer == this.lastConsumer);
        if ( this.cacheExpires > 0) {
            this.cacheValidity = new ExpiresValidity(this.cacheExpires*1000);                                              
        }
        final boolean purge = this.parameters.getParameterAsBoolean("purge-cache", false);
View Full Code Here

   
        final String uri = URLDecoder.decode(conf.getAttribute(ATTR_URI));
    final String cache = conf.getAttribute(ATTR_CACHE);
        final int expires = conf.getAttributeAsInteger(ATTR_EXPIRES);
    final String key = URLDecoder.decode(conf.getAttribute(ATTR_KEY));
    final IdentifierCacheKey cacheKey = new IdentifierCacheKey(key, false);
   
        final Parameters parameters = Parameters.fromConfiguration(conf);
       
        final TargetConfiguration tc = new TargetConfiguration(cacheKey, uri, cache, parameters);
   
        this.entries.put(key, tc);
    final String name = cacheKey.getKey();
   
    this.scheduler.addPeriodicJob(name,
                                      this.updateTarget,
                                  expires,
                                  true,
View Full Code Here

        String key = "source:" + source.getURI();
        String cacheName = parameters.getParameter("cache-name", null);
        if (cacheName != null) {
            key += ":" + cacheName;
        }
        this.cacheKey = new IdentifierCacheKey(key, false);
    }
View Full Code Here

            this.cacheExpires = Long.valueOf(expiresValue).longValue();
            objectModel.remove(CACHE_EXPIRES_KEY);
        }

        // and now prepare the caching information
        this.cacheKey = new IdentifierCacheKey(key,
                                           this.serializer == this.lastConsumer);
        if ( this.cacheExpires > 0) {
            this.cacheValidity = new ExpiresValidity(this.cacheExpires*1000);
        } else if ( this.cacheExpires < 0 ) {
            this.cacheValidity = NOPValidity.SHARED_INSTANCE;
View Full Code Here

        // prepare the pipeline
        super.preparePipeline( environment );

        // and now prepare the caching information
        this.cacheKey = new IdentifierCacheKey(key,
                                           this.serializer == this.lastConsumer);
        if ( this.cacheExpires > 0) {
            this.cacheValidity = new ExpiresValidity(this.cacheExpires*1000);
        } else if ( this.cacheExpires < 0 ) {
            this.cacheValidity = NOPValidity.SHARED_INSTANCE;
View Full Code Here

        String key = "source:" + getSourceURI();
        if (cacheName != null) {
            key += ":" + cacheName;
        }
        this.cacheKey = new IdentifierCacheKey(key, false);
    }
View Full Code Here

        String key = "source:" + getSourceURI();
        if (cacheName != null) {
            key += ":" + cacheName;
        }
        this.cacheKey = new IdentifierCacheKey(key, false);
    }
View Full Code Here

            this.cacheExpires = Long.valueOf(expiresValue).longValue();
            objectModel.remove(CACHE_EXPIRES_KEY);
        }

        // and now prepare the caching information
        this.cacheKey = new IdentifierCacheKey(key,
                                           this.serializer == this.lastConsumer);
        if ( this.cacheExpires > 0) {
            this.cacheValidity = new ExpiresValidity(this.cacheExpires*1000);
        }
        final boolean purge = this.parameters.getParameterAsBoolean("purge-cache", false);
View Full Code Here

        // prepare the pipeline
        super.preparePipeline( environment );

        // and now prepare the caching information
        this.cacheKey = new IdentifierCacheKey(key,
                                           this.serializer == this.lastConsumer);
        if ( this.cacheExpires > 0) {
            this.cacheValidity = new ExpiresValidity(this.cacheExpires*1000);
        }
        final boolean purge = this.parameters.getParameterAsBoolean("purge-cache", false);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.caching.IdentifierCacheKey

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.