Skip to content
Discussion options

You must be logged in to vote

The default implementation does not expose this.
The solution is quite simple because you can easily override the caching implementation (so you can take full control).

NOTE: The caching for the useragents and for the clienthints is separate, so you'll have 2 of these!

Create new classes similar this

public class Java11CacheInstantiator implements CacheInstantiator {
@Override
public Map<String, UserAgent.ImmutableUserAgent> instantiateCache(int cacheSize) {
return Caffeine.newBuilder().maximumSize(cacheSize).<String, UserAgent.ImmutableUserAgent>b…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nielsbasjes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants