As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
InMemoryLRUCache default cache size & unit for cache size parameter
S
Street Beat
started a topic
almost 10 years ago
We failed to find any documentation on how big the default cache size is for InMemoryLRUCache in the documentation: http://devcenter.kinvey.com/android/reference/api/java/reference/com/kinvey/java/cache/InMemoryLRUCache.html. There doesn't seem to be a way to get the cache size either.
In addition, what's the unit for cache size parameter for the InMemoryLRUCache constructors?
1 Comment
E
Edward
said
almost 10 years ago
Hey,
the default cache size is 16 and the default load factor is 0.75 -- these are the defaults of a `LinkedHashMap`, which the implementation is based on from http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html
If you want to build your own custom cache, you can just implement the `com.kinvey.java.cache.Cache` interface, which requires a put and a get method-- it is using two generics , one for the type of the keys and one for the type of the values.
I will add these to the javadocs for the class, as it should be more easily accessible.
Street Beat
In addition, what's the unit for cache size parameter for the InMemoryLRUCache constructors?