Package org.apache.cocoon.caching

Examples of org.apache.cocoon.caching.SimpleCacheKey


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

                SimpleCacheKey key = new SimpleCacheKey(cacheKey, true);
                try {
                    cache = (Cache)this.manager.lookup(cacheRole);
                    cache.remove(key);
               
                    key = new SimpleCacheKey(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


                        try {
                            String uri = URLDecoder.decode(childs[i].getAttribute("uri"));
                            int expires = childs[i].getAttributeAsInteger("expires");
                            String cache = childs[i].getAttribute("cache");                       
                            String key = URLDecoder.decode(childs[i].getAttribute("key"));
                            SimpleCacheKey cacheKey = new SimpleCacheKey(key, false);
                            TargetConfiguration tc = new TargetConfiguration(cacheKey, uri, expires, cache);
                            this.entries.put(key, tc);
                            final String name = cacheKey.getKey();
                           
                            this.scheduler.addPeriodicJob(name, this.schedulerTarget,
                                                  expires,
                                                  true,
                                                  tc.parameters,
View Full Code Here

        this.protocol = location.substring(0, protocolEnd);
        String endString = location.substring(separatorPos+1);
        separatorPos = endString.indexOf('@');
        if ( separatorPos == -1 ) {
            this.sourceURI = endString;
            this.streamKey = new SimpleCacheKey("source:" + this.sourceURI, false);
        } else {
            this.sourceURI = endString.substring(separatorPos+1);
            this.streamKey = new SimpleCacheKey("source:" + endString.substring(0, separatorPos), false);
        }
        this.uri = location;
        this.parameters = parameters;
    }
View Full Code Here

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

                SimpleCacheKey key = new SimpleCacheKey(cacheKey, true);
                try {
                    cache = (Cache)this.manager.lookup(cacheRole);
                    cache.remove(key);
               
                    key = new SimpleCacheKey(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

                        try {
                            String uri = URLDecoder.decode(childs[i].getAttribute("uri"));
                            int   expires = childs[i].getAttributeAsInteger("expires");
                            String cache = childs[i].getAttribute("cache");                       
                            String key = URLDecoder.decode(childs[i].getAttribute("key"));
                            SimpleCacheKey cacheKey = new SimpleCacheKey(key, false);
                            TargetConfiguration tc = new TargetConfiguration(cacheKey, uri, expires, cache);
                            this.entries.put(key, tc);
                            final String name = cacheKey.getKey();
                           
                            this.scheduler.addPeriodicJob(name, this.schedulerTarget,
                                                  expires,
                                                  true,
                                                  tc.parameters,
View Full Code Here

                        try {
                            String uri = URLDecoder.decode(childs[i].getAttribute("uri"));
                            int   expires = childs[i].getAttributeAsInteger("expires");
                            String cache = childs[i].getAttribute("cache");                       
                            String key = URLDecoder.decode(childs[i].getAttribute("key"));
                            SimpleCacheKey cacheKey = new SimpleCacheKey(key, false);
                            TargetConfiguration tc = new TargetConfiguration(cacheKey, uri, expires, cache);
                            this.entries.put(key, tc);
                            final String name = cacheKey.getKey();
                           
                            this.scheduler.addPeriodicJob(name, this.schedulerTarget,
                                                  (long)expires,
                                                  true,
                                                  tc.parameters,
View Full Code Here

        this.protocol = location.substring(0, protocolEnd);
        String endString = location.substring(separatorPos+1);
        separatorPos = endString.indexOf('@');
        if ( separatorPos == -1 ) {
            this.sourceURI = endString;
            this.streamKey = new SimpleCacheKey("source:" + this.sourceURI, false);
        } else {
            this.sourceURI = endString.substring(separatorPos+1);
            this.streamKey = new SimpleCacheKey("source:" + endString.substring(0, separatorPos), false);
        }
        this.uri = location;
        this.parameters = parameters;
    }
View Full Code Here

TOP

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

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.