MCPcopy Create free account
hub / github.com/bytedance/bolt / makePins

Method makePins

bolt/common/caching/AsyncDataCache.h:812–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810 // 'keys'.
811 template <typename SizeFunc, typename ProcessPin>
812 void makePins(
813 const std::vector<RawFileCacheKey>& keys,
814 SizeFunc sizeFunc,
815 ProcessPin processPin,
816 bool cacheable = true) {
817 for (auto i = 0; i < keys.size(); ++i) {
818 auto pin = findOrCreate(keys[i], sizeFunc(i), nullptr, cacheable);
819 if (pin.empty() || pin.checkedEntry()->isShared()) {
820 continue;
821 }
822 processPin(i, std::move(pin));
823 }
824 }
825
826 // Drops all unpinned entries. Pins stay valid.
827 void clear();

Callers 2

loadDataMethod · 0.45
loadDataMethod · 0.45

Calls 4

isSharedMethod · 0.80
checkedEntryMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected