Package org.apache.cocoon.caching

Examples of org.apache.cocoon.caching.TimeStampCacheValidity


     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        if (this.inputSource.getLastModified() != 0) {
            return new CompositeCacheValidity(
                            new TimeStampCacheValidity(page),
                            new TimeStampCacheValidity(this.inputSource.getLastModified())
                       );
        } else {
            return null;
        }
    }
View Full Code Here


            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                if (current.getLastModified() == 0) {
                        return null;
                } else {
                    v.add(new TimeStampCacheValidity(current.getLastModified()));
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here

     *
     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        return new TimeStampCacheValidity(this.inputSource.getLastModified());
    }
View Full Code Here

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        if (this.inputSource.getLastModified() != 0) {
            return new TimeStampCacheValidity(this.inputSource.getLastModified());
        }
        return null;
    }
View Full Code Here

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        if (this.lastModified > 0) {
            return new TimeStampCacheValidity(this.lastModified);
        } else {
            if (this.defaultCache) {
                return NOPCacheValidity.CACHE_VALIDITY;
            } else {
                return null;
View Full Code Here

     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        long modified = this.inputSource.getLastModified();
        if (modified != 0) {
            return new TimeStampCacheValidity(modified);
        }
        return null;
    }
View Full Code Here

            return null;
        }

        // No store - fallback to previous implementation
        if (!useStore) {
            return new TimeStampCacheValidity(stylesheet.getLastModified());
        }

        // Get data from cache
        String id = stylesheet.getSystemId();
        Object[] templateAndTimeAndIncludes = (Object[])store.get(id);
        if (templateAndTimeAndIncludes != null && templateAndTimeAndIncludes[2] != null) {
            // Create aggregated validity
            List includes = (List)templateAndTimeAndIncludes[2];
            AggregatedCacheValidity validity = new AggregatedCacheValidity();
            validity.add(new TimeStampCacheValidity(stylesheet.getLastModified()));
            for (int i = includes.size() - 1; i >= 0; i--) {
                Object[] pair = (Object[])includes.get(i);
                long time = ((Long)pair[1]).longValue();
                validity.add(new TimeStampCacheValidity(time));
            }
            return validity;
        } else {
            // No data - fallback to previous implementation
            return new TimeStampCacheValidity(stylesheet.getLastModified());
        }
    }
View Full Code Here

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        if (this.inputSource.getLastModified() != 0) {
            return new TimeStampCacheValidity(this.inputSource.getLastModified());
        }
        return null;
    }
View Full Code Here

TOP

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

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.