添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

That is not supported by the core library. You can easily apply a copy function before adding or after reading from the cache. The core is more like a bounded ConcurrentHashMap .

The JCache module includes this concept in the standard, which combines the two settings into store-by-value . When enabled you can supply a Copier , where it defaults to Java serialization, and it copies all key/value pairs going in/out of the cache. Note that the default copier isn't recommended since native serialization is slow and prone to security problems. Unfortunately while the JCache standard is nice for integrations (e.g. Hibernate), it has a quirky api that can be frustrating for application development.…

That is not supported by the core library. You can easily apply a copy function before adding or after reading from the cache. The core is more like a bounded ConcurrentHashMap .

The JCache module includes this concept in the standard, which combines the two settings into store-by-value . When enabled you can supply a Copier , where it defaults to Java serialization, and it copies all key/value pairs going in/out of the cache. Note that the default copier isn't recommended since native serialization is slow and prone to security problems. Unfortunately while the JCache standard is nice for integrations (e.g. Hibernate), it has a quirky api that can be frustrating for application development. Therefore I typically recommend using the core api when possible and JCache for frameworks that depend on it.