You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Guava cache extension that allows caches to persist cache entries when they cannot longer be stored in memory.
2
-
An implementation that overflows to the file system is provided.
2
+
An implementation that overflows to the file system is provided including a corresponding CacheBuilder with similar semantics than the Guava CacheBuilder.
3
+
4
+
For creating a cache that overflows to disk, just proceed as when using the Guava CacheBuilder:
5
+
6
+
Cache<String, String> stringCache =
7
+
FileSystemCacheBuilder.newBuilder()
8
+
.maximumSize(100L)
9
+
.softValues()
10
+
.build();
11
+
12
+
Note: This cache implementation has slightly different semantics than the Cache / LoadingCache interface contracts specify:
13
+
* Any limits set for this cache do only concern the cache's memory size. Cache entries exceeding this limit will overflow to disk.
14
+
* When calling the non-argument invalidateAll() method, the RemovalListener is only informed about the expiration of entries that
15
+
are still stored in memory.
16
+
* When the cache is not longer in use, its invalidateAll() method should be called if the cache's overflow folder is not cleared by
17
+
the operating system.
18
+
19
+
Licensed under the Apache Software License, Version 2.0
0 commit comments