类 CachingResourceTransformer

java.lang.Object
cn.taketoday.web.resource.CachingResourceTransformer
所有已实现的接口:
ResourceTransformer

public class CachingResourceTransformer extends Object implements ResourceTransformer
A ResourceTransformer that checks a Cache to see if a previously transformed resource exists in the cache and returns it if found, and otherwise delegates to the resolver chain and saves the result in the cache.
从以下版本开始:
4.0
作者:
Rossen Stoyanchev
  • 字段详细资料

    • logger

      private static final cn.taketoday.logging.Logger logger
    • cache

      private final cn.taketoday.cache.Cache cache
  • 构造器详细资料

    • CachingResourceTransformer

      public CachingResourceTransformer(cn.taketoday.cache.Cache cache)
    • CachingResourceTransformer

      public CachingResourceTransformer(cn.taketoday.cache.CacheManager cacheManager, String cacheName)
  • 方法详细资料

    • getCache

      public cn.taketoday.cache.Cache getCache()
      Return the configured Cache.
    • transform

      public cn.taketoday.core.io.Resource transform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) throws IOException
      从接口复制的说明: ResourceTransformer
      Transform the given resource.
      指定者:
      transform 在接口中 ResourceTransformer
      参数:
      request - the current request
      resource - the resource to transform
      transformerChain - the chain of remaining transformers to delegate to
      返回:
      the transformed resource (never null)
      抛出:
      IOException - if the transformation fails