public void put(final K key, final V value) { incrementReportEntity(this.putCount); final CacheEntry<V> entry = new CacheEntry<V>(value, this.useSoftReferences); // newSize will be -1 if traceExecution is false final int newSize = this.dataContainer.put(key, entry); if (this.traceExecution) { this.logger.trace( "[THYMELEAF][{}][{}][CACHE_ADD][{}] Adding cache entry in cache \"{}\" for key \"{}\". New size is {}.", new Object[] {TemplateEngine.threadIndex(), this.name, Integer.valueOf(newSize), this.name, key, Integer.valueOf(newSize)}); outputReportIfNeeded(); } }
public V get(final K key, final ICacheEntryValidityChecker<? super K, ? super V> validityChecker) { incrementReportEntity(this.getCount); final CacheEntry<V> resultEntry = this.dataContainer.get(key); incrementReportEntity(this.missCount); if (this.traceExecution) { this.logger.trace( if (resultValue == null) { final int newSize = this.dataContainer.remove(key); incrementReportEntity(this.missCount); if (this.traceExecution) { this.logger.trace( incrementReportEntity(this.hitCount); if (this.traceExecution) { this.logger.trace(
public void put(final K key, final V value) { incrementReportEntity(this.putCount); final CacheEntry<V> entry = new CacheEntry<V>(value, this.useSoftReferences); // newSize will be -1 if traceExecution is false final int newSize = this.dataContainer.put(key, entry); if (this.traceExecution) { this.logger.trace( "[THYMELEAF][{}][{}][CACHE_ADD][{}] Adding cache entry in cache \"{}\" for key \"{}\". New size is {}.", new Object[] {TemplateEngine.threadIndex(), this.name, Integer.valueOf(newSize), this.name, key, Integer.valueOf(newSize)}); } outputReportIfNeeded(); }
public V get(final K key, final ICacheEntryValidityChecker<? super K, ? super V> validityChecker) { incrementReportEntity(this.getCount); incrementReportEntity(this.missCount); if (this.traceExecution) { this.logger.trace( new Object[] {TemplateEngine.threadIndex(), this.name, this.name, key}); incrementReportEntity(this.missCount); outputReportIfNeeded(); return null; incrementReportEntity(this.hitCount); outputReportIfNeeded(); return resultValue;