Class CacheBehaviour


  • public final class CacheBehaviour
    extends Object
    CacheBehaviour defines constants for the various cache maintenance strategies. The effective strategy depends on two factors, whether the repository implementation supports observation and the behaviour provided in the RepositoryConfig.
    • Field Detail

      • INVALIDATE

        public static final CacheBehaviour INVALIDATE
        Cache maintenance is done by invalidating affected items of an operation and forcing the jcr2spi implementation to reload the item states when they are accessed next time. No event listener is used for cache maintenance even though the repository implementation might support observation.
      • OBSERVATION

        public static final CacheBehaviour OBSERVATION
        Cache maintenance is done using events from the repository. After an operation has been executed on the RepositoryService events are retrieved from the repository and the cache is updated based on the returned events. This strategy requires that the repository implementation supports observation.