3 Replies Latest reply on Oct 27, 2004 4:27 AM by kvistgaard

    FIFOPolicy

      I have implemented a simple FIFO eviction policy based on the LRU implementation and it seems to work OK. However the implementation could be simplified a great deal if the LRU classes were made more friendly for extension.

      I've used the same configuration as the LRU implementation, but for FIFO an attribute named 'timeToLive' may be more appropriate than 'timeToIdleSeconds'. The advantage of having the same configuration for both policies is obvisously that the policies can easily be swapped.

      I'd be hapy to supply a patch with the FIFOPolicy and the required changes to the LRU classes if there's any interest.


      Regards and keep up with the excellent work!

      Morten

        • 1. Re: FIFOPolicy
          belaban

          Hi Morton,

          why don't you contact Ben Wang and send him your changes, so we can integrate this with JBossCache.
          Thanks for your contribution !

          Bela

          • 2. Re: FIFOPolicy

            Morton,

            Yes, please send it to ben.wang@jboss.com. I realized the naming is not good and have been thinking whether I should rename it or not. Only thing is that it has been out for a while so I am not sure whether this will disrupt upgrade or not.

            Thanks,

            -Ben

            • 3. Re: FIFOPolicy

              Hi Ben,

              I'll send you a simple low impact patch (hopefully ;-) for the FIFO policy when I get back tonight. After that you can decide if you'd like anything else to be modified.

              Later,

              -Morten