Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30335

As a Developer I want in-memory cache to clear cache using LFU approach

Details

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: High High
    • 2.5.0
    • 2.2.3, 2.3.2, 2.4.2, 2.5.0-rc2
    • None

    Description

      The in-memory cache introduced in 2.5-rc2 in EZP-29659 clears cache when reaching limit of items by FIFO (First In First Out) approach*.

      However as cache will be added for more objects, and/or also for larger installs the default limit of 100 items will be reached rather fast.
      Effect will be that cache items that are very often requested (especially languages and content types) will be evicted from the cache and will be needed to be re-fetched much more often then needed.

      There are two parallel options that can help tune this:

      • Increase the limit from current default of 100 items
      • Implement LFU (Last Frequently Used) approach* for cache replacement

      The latter will be most efficient as it's about keeping track of how often cache items are requested, and on need to evict ("vacuum") cache items delete least frequently used cache items first.

      * https://en.wikipedia.org/wiki/Cache_replacement_policies

      NOTE: The reason why LFU and not LRU is proposed is that in-memory cache by design is meant to be short lived, so we don't risk that the LFU tracking need to take into account if cache items where for a short while in great demand but no longer needed, expiry will take care of that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andre.romcke-obsolete@ez.no André Rømcke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: