improve CachedGraphTransaction perf by javeme · Pull Request #1743 · apache/hugegraph
| public <V> Cache<Id, V> cache(String name, long capacity) { | ||
| if (!this.caches.containsKey(name)) { | ||
| this.caches.putIfAbsent(name, new RamCache(capacity)); | ||
| LOG.info("Init RamCache for '{}' with capacity {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we use info for it (or use debug) ? like the first time fulfill cache
and RamCache seems not clearly compare to OffHeapCache? (level cache also have this problem)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a frequent action, and just log for 3 cache entrances(cache/offheapCache/levelCache).
RamCache may be renamed HeapCache in the future.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, use HeapCache or InHeapCache is more readable
javeme
deleted the
cache-tx-improve
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters