From b757922baacabf84a4621bc21dcdcd00e47077c1 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Sat, 12 Oct 2024 00:47:27 +0800 Subject: [PATCH] refactor: Lru cache provider --- .../java/io/optimism/utilities/LruCacheProvider.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/java/io/optimism/utilities/LruCacheProvider.java diff --git a/src/main/java/io/optimism/utilities/LruCacheProvider.java b/src/main/java/io/optimism/utilities/LruCacheProvider.java new file mode 100644 index 0000000..5182f9d --- /dev/null +++ b/src/main/java/io/optimism/utilities/LruCacheProvider.java @@ -0,0 +1,11 @@ +package io.optimism.utilities; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; + +public class LruCacheProvider { + + static Cache create() { + return CacheBuilder.newBuilder().maximumSize(1000L).build(); + } +}