info.magnolia.imaging.caching
Interface CachingStrategy<P>

Type Parameters:
P - type of ParameterProvider's parameter
All Known Implementing Classes:
AbstractContentBasedCachingStrategy, ContentBasedCachingStrategy, NodeDataBasedCachingStrategy, NullCachingStrategy

public interface CachingStrategy<P>

Defines a CachingStrategy.

Version:
$Id$

Method Summary
 String getCachePath(ImageGenerator<ParameterProvider<P>> generator, ParameterProvider<P> parameterProvider)
          Returns a unique path pertinent to the given generator and parameter to use for storing the generated image.
 boolean shouldRegenerate(info.magnolia.cms.core.NodeData cachedBinary, ParameterProvider<P> parameterProvider)
          Given the currently cached generated image, determine if CachingImageStreamer should regenerate the image.
 

Method Detail

getCachePath

String getCachePath(ImageGenerator<ParameterProvider<P>> generator,
                    ParameterProvider<P> parameterProvider)
Returns a unique path pertinent to the given generator and parameter to use for storing the generated image.


shouldRegenerate

boolean shouldRegenerate(info.magnolia.cms.core.NodeData cachedBinary,
                         ParameterProvider<P> parameterProvider)
Given the currently cached generated image, determine if CachingImageStreamer should regenerate the image. Implementations will most likely simply compare the timestamp with their parameter if applicable, or use some other mechanism.



Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.