Package org.apache.cocoon.pipeline.caching

Examples of org.apache.cocoon.pipeline.caching.CacheKey


        // collect ETag
        final String noneMatch = getIfNoneMatch();
        if (pipeline instanceof CachingPipeline) {
            CachingPipeline<PipelineComponent> cachingPipeline = (CachingPipeline<PipelineComponent>) pipeline;
            CacheKey cacheKey = cachingPipeline.getCacheKey();
            if (cacheKey != null) {
                setETag(Integer.toHexString(cacheKey.hashCode()));
            }
        }

        // set last-modified
        if (lastModified > -1 || getLastModified() <= 0) {
View Full Code Here


        for (PipelineComponent pipelineComponent : this.getComponents()) {
            if (pipelineComponent instanceof CachingPipelineComponent) {
                CachingPipelineComponent cachablePipelineComponent = (CachingPipelineComponent) pipelineComponent;

                CacheKey cacheKey = cachablePipelineComponent.constructCacheKey();
                if (cacheKey != null) {
                    result.addCacheKey(cacheKey);
                    if (this.logger.isDebugEnabled()) {
                        this.logger.debug("  ~ adding " + cacheKey + " for component " + pipelineComponent);
                    }

                    continue;
                }
            }

            // support expires caching
            if (this.expires != null) {
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("  ~ adding " + ExpiresCacheKey.class.getSimpleName() + " for component: "
                            + pipelineComponent + " (the component doesn't support caching "
                            + "but expires caching is activated)");
                }

                return new ExpiresCacheKey(new InvalidCacheKey(this.expiresCacheKey), this.expires);
            }

            // component does not support caching
            if (this.logger.isDebugEnabled()) {
                this.logger.debug("  ~ no caching: " + pipelineComponent);
                this.logger.debug("Aborting cache key construction");
            }

            return null;
        }

        // support expires caching
        if (this.expires != null) {
            CacheKey expiresCacheKey = new ExpiresCacheKey(result, this.expires);

            if (this.logger.isDebugEnabled()) {
                this.logger.debug("Creating  " + expiresCacheKey + " for pipeline " + this);
            }
View Full Code Here

        for (PipelineComponent pipelineComponent : this.getComponents()) {
            if (pipelineComponent instanceof CachingPipelineComponent) {
                CachingPipelineComponent cachablePipelineComponent = (CachingPipelineComponent) pipelineComponent;

                CacheKey cacheKey = cachablePipelineComponent.constructCacheKey();
                result.addCacheKey(cacheKey);
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("  ~ adding " + cacheKey + " for component " + pipelineComponent);
                }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.pipeline.caching.CacheKey

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.