MCPcopy Create free account
hub / github.com/apache/arrow / MemoizeLru

Function MemoizeLru

cpp/src/arrow/util/cache_internal.h:190–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188// Apply a LRU memoization cache to a callable.
189template <typename Func>
190static auto MemoizeLru(Func&& func, int32_t cache_capacity)
191 -> decltype(detail::Memoize<LruCache, detail::ThreadSafeMemoizer>(
192 std::forward<Func>(func), cache_capacity)) {
193 return detail::Memoize<LruCache, detail::ThreadSafeMemoizer>(std::forward<Func>(func),
194 cache_capacity);
195}
196
197// Like MemoizeLru, but not thread-safe. This version allows for much faster
198// lookups (more than 2x faster), but you'll have to manage thread safety yourself.

Callers 3

MemoizeLruCachedFunction · 0.85
MemoizeLruFactoryClass · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by 1

operator()Method · 0.68