4 Replies Latest reply on Apr 18, 2006 9:52 PM by Ben Wang

    Best way to enable and disable cacheloader and eviction

    Ben Wang Master

      In the previous version of JBossCache, to enable/disable a feature, we simply specify an empty string to the provider class. For example, for the tm, if we specify:

       <attribute name="TransactionManagerLookupClass"></attribute>
      

      then there is not tx involved. Same thing for eviction policy and cache loader.

      However, in 1.3 (for cache loader) and 1.4 (for eviction), since we support chained cache loader and multiple eviction regions, one single class doesn't cut it anymore.

      As a result, when you need to disable either loader or eviction feature, you will need to either delete or comment out the xml element.

      Now, comment it out is fine except if you have many regions (or many loader) configured and you have embeded comments there already. Then it becomes tedious.

      So may be it is just me who is old fashion. :-) But how about we provide an explit flag to enable/disable these features? This way, we decouple the activation from the configuration details.

      How about UseEviction and UseCacheLoader flags in 1.4?