Examples of generateCacheKey()


Examples of com.github.dandelion.core.asset.cache.AssetCacheManager.generateCacheKey()

  }
 
  public String getConfigurationFromPage(String page) {
    AssetCacheManager cacheManager = new AssetCacheManager(null);
    Asset asset = new Asset("dandelion-datatables", "0.10.0", AssetType.js);
    String cacheKey = cacheManager.generateCacheKey("http://" + SERVER_HOST + ":" + SERVER_PORT + "/thymeleaf/" + page, asset);
    String url = "http://" + SERVER_HOST + ":" + SERVER_PORT + DandelionServlet.DANDELION_ASSETS_URL + cacheKey;
    try {
      URL urlLocation = new URL(url);
      return ResourceUtils.getContentFromInputStream(urlLocation.openStream());
    }
View Full Code Here

Examples of com.github.dandelion.core.asset.cache.AssetCacheManager.generateCacheKey()

  }
 
  public String getConfigurationFromPage(String page) {
    AssetCacheManager cacheManager = new AssetCacheManager(null);
    Asset asset = new Asset("dandelion-datatables", "0.10.0", AssetType.js);
    String cacheKey = cacheManager.generateCacheKey("http://" + SERVER_HOST + ":" + SERVER_PORT + "/" + page + ".jsp", asset);
    String url = "http://" + SERVER_HOST + ":" + SERVER_PORT + DandelionServlet.DANDELION_ASSETS_URL + cacheKey;
    try {
      URL urlLocation = new URL(url);
      return ResourceUtils.getContentFromInputStream(urlLocation.openStream());
    }
View Full Code Here

Examples of com.skyline.energy.definition.CacheDefinition.generateCacheKey()

    if (cacheDefinition == null) {
      return cacheResult;
    }

    String key = cacheDefinition.generateCacheKey(args);
    if (StringUtils.isEmpty(key)) {
      LOGGER.debug("创建缓存KEY失败,不进行缓存!");
      return cacheResult;
    }
    cacheResult.setKey(key);
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      final CacheKeyInvocationContext<CacheRemove> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);
      final CacheRemove cacheRemoveEntry = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);

      if (!cacheRemoveEntry.afterInvocation()) {
         cache.remove(cacheKey);
         if (log.isTraceEnabled()) {
            log.tracef("Remove entry with key '%s' in cache '%s' before method invocation", cacheKey, cache.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      }

      final CacheKeyInvocationContext<CachePut> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final CachePut cachePut = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);

      final Object valueToCache = cacheKeyInvocationContext.getValueParameter().getValue();

      if (!cachePut.afterInvocation() && valueToCache != null) {
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      }

      final CacheKeyInvocationContext<CacheResult> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final CacheResult cacheResult = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);

      Object result = null;

      if (!cacheResult.skipGet()) {
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      }

      final CacheKeyInvocationContext<CachePut> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final CachePut cachePut = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);

      final Object valueToCache = cacheKeyInvocationContext.getValueParameter().getValue();

      if (!cachePut.afterInvocation() && valueToCache != null) {
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      }

      final CacheKeyInvocationContext<CacheResult> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final CacheResult cacheResult = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);

      Object result = null;

      if (!cacheResult.skipGet()) {
View Full Code Here

Examples of javax.cache.annotation.CacheKeyGenerator.generateCacheKey()

      final CacheKeyInvocationContext<CacheRemoveEntry> cacheKeyInvocationContext = contextFactory.getCacheKeyInvocationContext(invocationContext);
      final CacheKeyGenerator cacheKeyGenerator = cacheKeyInvocationContext.unwrap(CacheKeyInvocationContextImpl.class).getCacheKeyGenerator();
      final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);
      final CacheRemoveEntry cacheRemoveEntry = cacheKeyInvocationContext.getCacheAnnotation();
      final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);

      if (!cacheRemoveEntry.afterInvocation()) {
         cache.remove(cacheKey);
         if (log.isTraceEnabled()) {
            log.tracef("Remove entry with key '%s' in cache '%s' before method invocation", cacheKey, cache.getName());
View Full Code Here

Examples of org.hibernate.engine.SessionImplementor.generateCacheKey()

      version = persister.getVersion( instance, session.getEntityMode() );
    }

    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = session.generateCacheKey( id, persister.getIdentifierType(), persister.getRootEntityName() );
      lock = persister.getCacheAccessStrategy().lockItem( ck, version );
    }
    else {
      ck = null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.