]> source.dussan.org Git - jgit.git/commit
DFS block cache: allow multiple passes for blocks before eviction 41/184341/6
authorAlina Djamankulova <adjama@google.com>
Tue, 24 Aug 2021 01:22:41 +0000 (18:22 -0700)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 8 Oct 2021 12:35:01 +0000 (14:35 +0200)
commit7d4f3c22ab26b98b703873c3554fec514f109752
tree43497068952c2b012a795f9217f351dd7f9e99e3
parent578b6a79a3de1dcb933f3f58f5e6b5b133371360
DFS block cache: allow multiple passes for blocks before eviction

Let certain pack extensions that are expensive to load from storage
(e.g. pack index, bitmap index) stay in DFS block cache longer than
others by overriding default cache count through DfsBlockCacheConfig

Don't change default behavior when cache override map is empty. Use int
cacheCount instead of boolean hot for Ref<T>

Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: I18062784ec9cc14dbba3e4bb8d9509440cf2d44f
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java