long maxWeight,
DocumentNodeStore docNodeStore,
DocumentStore docStore
) {
Cache<K, V> cache = buildCache(maxWeight);
PersistentCache p = getPersistentCache();
if (p != null) {
if (docNodeStore != null) {
docNodeStore.setPersistentCache(p);
}
cache = p.wrap(docNodeStore, docStore, cache, cacheType);
}
return cache;
}