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

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Documentation Done
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 2.2.3, 2.3.2, 2.4.2, 2.5.0-rc2
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:

      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

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andre.romcke@ez.no André Rømcke
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: