重置自动加载时间

@param cacheKey 缓存Key
193718
public void resetAutoLoadLastLoadTime(CacheKeyTO cacheKey) {
        if (null == autoLoadMap) {
            return;
        }
        AutoLoadTO autoLoadTO = autoLoadMap.get(cacheKey);
        if (null != autoLoadTO && !autoLoadTO.isLoading()) {
            autoLoadTO.setLastLoadTime(1L);
        }
    }
819168
public static void loadCache(Map<String, String> cache, File file, int maxSize) {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
            String line = null;
            while ((line = br.readLine()) != null) {
                int sepIndex = line.indexOf(" ");
                String hash = line.substring(0, sepIndex);
                String urlExternalForm = line.substring(sepIndex + 1);
                cache.put(urlExternalForm, hash);
            }
        } catch (FileNotFoundException e) {
            // Nothing: New cache will be used.
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            FileUtil.closeAndIgnoreExceptions(br);
        }
    }
206778
@Override
    public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final LocaleManager localeManager = this.getLocaleManager(request);

        final List<Locale> locales = localeManager.getLocales();
        if (locales != null && locales.size() > 0 && locales.get(0) != null) {
            final String locale = locales.get(0).toString();
            final String xslLocale = locale.replace('_', '-');
            return CacheKey.build(this.getClass().getName(), xslLocale);
        }

        return null;
    }
1160223
public synchronized void put(final CacheKey key, final EncodedImage encodedImage) {
    Preconditions.checkNotNull(key);
    Preconditions.checkArgument(EncodedImage.isValid(encodedImage));

    // we're making a 'copy' of this reference - so duplicate it
    final EncodedImage oldEntry = mMap.put(key, EncodedImage.cloneOrNull(encodedImage));
    EncodedImage.closeSafely(oldEntry);
    logStats();
  }
398378
private void initCacheSyncTask(){
        int delay = getServiceDirectoryConfig().getInt(
                SD_API_CACHE_SYNC_DELAY_PROPERTY,
                SD_API_CACHE_SYNC_DELAY_DEFAULT);
        int interval = getServiceDirectoryConfig().getInt(
                SD_API_CACHE_SYNC_INTERVAL_PROPERTY,
                SD_API_CACHE_SYNC_INTERVAL_DEFAULT);

        syncService.scheduleWithFixedDelay(new CacheSyncTask(),
                delay, interval, TimeUnit.SECONDS);
    }
764929
public static void cacheParseFailure(XmlFileModel key)
    {
        map.put(getKey(key), new CacheDocument(true, null));
    }
925082
@Override
    public synchronized void remove(String key) {
        boolean deleted = getFileForKey(key).delete();
        removeEntry(key);
        if (!deleted) {
            //todo add queue markers
//            JusLog.d("Could not delete cache entry for key=%s, filename=%s",
//                    key, getFilenameForKey(key));
        }
    }
425993
protected void initCaches(int cacheSize) {

        m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
        m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
    }
1259225
private void put(T item) {
        HashMap<String,Object> keys;

        if( item == null ) {
            throw new NullPointerException("Multi caches may not have null values.");
        }
        keys = getKeys(item);
        synchronized( this ) {
            for( String key : caches.keySet() ) {
                ConcurrentCache<Object,T> cache = caches.get(key);
                Object ob = keys.get(key);

                if( ob instanceof BigDecimal ) {
                    ob = ((BigDecimal)ob).longValue();
                }
                cache.put(ob, item);
            }
        }
    }
498958
@Override
    public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final Resource stylesheetResource = this.getStylesheetResource(request);
        final Serializable stylesheetCacheKey;
        try {
            stylesheetCacheKey = this.xmlUtilities.getStylesheetCacheKey(stylesheetResource);
        } catch (TransformerConfigurationException e) {
            throw new RuntimeException(
                    "Failed to get Transformer for stylesheet: " + stylesheetResource, e);
        } catch (IOException e) {
            throw new RuntimeException("Failed to load stylesheet: " + stylesheetResource, e);
        }

        return CacheKey.build(stylesheetResource.getDescription(), stylesheetCacheKey);
    }
785367
protected void putToCache(String cacheName, String key, Object value,
            long expireAfterWriteSeconds, long expireAfterAccessSeconds) {
        try {
            ICache cache = getCache(cacheName);
            if (value != null && cache != null) {
                cache.set(key, value, expireAfterWriteSeconds, expireAfterAccessSeconds);
            }
        } catch (CacheException e) {
            LOGGER.warn(e.getMessage(), e);
        }
    }
949550
@Override
	public void put(String key, Object obj) {

		cache.put(new Element(key, obj));
	}
697124
@Override
    public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final CacheKeyBuilder cacheKeyBuilder = CacheKey.builder(this.getClass().getName());

        for (final TransformerConfigurationSource source : this.sources) {
            final CacheKey key = source.getCacheKey(request, response);
            cacheKeyBuilder.add(key);
        }

        return cacheKeyBuilder.build();
    }
730672
public void put(String key, Object object, Envelope envelope) {
		index.put(key, envelope);
		cache.put(key, object);
	}
55662
protected final void putInCache (@Nonnull final KEYTYPE aKey, @Nonnull final VALUETYPE aValue)
  {
    ValueEnforcer.notNull (aKey, "cacheKey");
    ValueEnforcer.notNull (aValue, "cacheValue");

    m_aRWLock.writeLocked ( () -> putInCacheNotLocked (aKey, aValue));
  }
573849
public final boolean add(final String key, final int exp, final Object value)
      throws TimeoutException, InterruptedException, MemcachedException {
    return this.add(key, exp, value, this.opTimeout);
  }
1239412
public void put(final long cacheKey, final FilterJoinTerms terms) {
    logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey);
    this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), terms.getSize(), terms.isPruned()));
  }