Eclipse link 共享缓存与受保护缓存

Eclipse link shared vs protected cache

The protected cache option allows for shared objects to reference isolated objects. Setting the cache isolation to PROTECTED for an entity enables its shared cache. The protected option is mostly the same as the shared option, except that protected entities can have relationships to isolated entities, where as shared can not.

这个异常是什么意思。如果它们与受保护的实体有关系,这是否会使孤立的实体共享

一个孤立的实体是孤立的,所以它永远不会在共享缓存中。受保护与共享仅影响它所应用的实体,以及允许保留的引用。对孤立实体的引用需要特殊处理(和开销),以便孤立实体不会最终出现在共享缓存中,因此允许引用孤立实体的共享实体被赋予了特殊的名称。

受保护的选项可用于确保只读实体和查询始终复制缓存的对象。因此,您可以使用 EclipseLink 模拟数据缓存。 while shared ready-only 不会被复制。