Little Bird
Little Bird

Reputation: 91

Guava's LocalCache could not be used, why?

Because this class is only package accessible.

Upvotes: 0

Views: 702

Answers (1)

Andy Turner
Andy Turner

Reputation: 140494

You're not meant to use that class directly. It's an implementation detail of the Guava cache package.

Build your cache using CacheBuilder.

There are a lot of classes that are package-private in Guava (and, of course, other libraries). They're simply not part of the public API.

Upvotes: 4

Related Questions