2 Replies Latest reply on Oct 1, 2013 9:45 AM by durante

    Cache versioning

    durante Newbie



      after searching the web for a way to enable data versioning in Infinispan (6.0.0 Alpha4), all I could find was this page [1], which is marked as deprecated.

      Anyway, adding the referenced XML tag [2] didn't work, and actually threw an exception on server startup:

      "Message: JBAS014789: Unexpected element '{urn:infinispan:server:core:6.0}versioning' encountered".


      My question then is: Is there a way to enable cache data versioning in Infinispan? If so, how to activate it?


      I want all changes in a specific cache to be versioned (either in memory or db), thus when needed, the application user list changes made to a given entry over the time.



      Any clues?


      [1] Data Versioning - Infinispan 6.0 - Project Documentation Editor



      <versioning enabled="false" type="SIMPLE|PARTITION_AWARE|EXTERNAL" useTombstones="false" tombstoneLifespan="60000"/>




      Thanks in advance,


        • 1. Re: Cache versioning
          Martin Gencur Novice


          there's no way to see history of changes made to cache entries. So you cannot enable versioning that would work in this way. However, the last version (just integer) of entries is stored so that you can perform operations like remoteCache.replaceWithVersion via HotRod or memcachedClient.gets() via Memcached and replace the entry only if the version matches the previously known value.



          • 2. Re: Cache versioning
            durante Newbie

            Hi Martin,


            so the only alternative I see in this case is to use JCR, like ModeShape, in order to keep track of changes.

            Would you suggest any other out of the box tool/implementation?