Hi Edgar,

Edgar Poce wrote:
Hi

SharedItemStateManager only caches the existent states and not the result of persistMgr.exists(). It causes that when other components in jackrabbit asks repeatedly about the existence of an unexistent item (calls to ShareditemStateManager.hasNonVirtualItemState) the SharedItemStateManager delegates every call to the PM. Is it the intended behaviour?


At the time, the SharedItemStateManager was originally created, calls to
hasItemState() for non-existent items were considered exceptional, therefore no special care was taken to cache the negative response from the PM. As your tests have shown, the SharedItemStateManager used within the versioning PM appears to be treated differently. Instead of changing the general SharedItemStateManager behaviour, I would rather suggest that the versioning part creates a specialized, derived SharedItemStateManager that avoids calling the PM over and over again for the same, non-existent items.


Kind Regards
Dominique

Reply via email to