<dependency> <groupId>com.googlecode.concurrentlinkedhashmap</groupId> <artifactId>concurrentlinkedhashmap-lru</artifactId> <version>1.4.2</version> </dependency> import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; ConcurrentLinkedHashMap<KeyType, ValueType> cache = new ConcurrentLinkedHashMap.Builder<KeyType, ValueType>() .maximumWeightedCapacity(1000) .build(); ValueType value = cache.get(key); cache.put(key, value); cache.remove(key);


上一篇:
下一篇:
切换中文