Interface ICachePolicy

All Known Implementing Classes:
FIFO, LFU, LIFO, LRU, MFU, MRU, Random
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ICachePolicy
The base interface for a cache policy in BoxLang. Each policy must return a Comparator based on the policy's rules and the ICacheEntry interface. This is also a functional interface, so you can use a lambda expression to implement it. BoxLang ships with the following policies: - Least Recently Used (LRU) - Most Recently Used (MRU) - Least Frequently Used (LFU) - Most Frequently Used (MFU) - First In First Out (FIFO) - Last In First Out (LIFO) - Random
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the comparator for this policy
  • Method Details

    • getComparator

      Comparator<ICacheEntry> getComparator()
      Get the comparator for this policy
      Returns:
      The comparator for this policy