Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thibaultcha/lua-resty-mlcache
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.4.1
Choose a base ref
...
head repository: thibaultcha/lua-resty-mlcache
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.5.0
Choose a head ref
  • 15 commits
  • 13 files changed
  • 2 contributors

Commits on Mar 25, 2020

  1. Configuration menu
    Copy the full SHA
    013f94f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c17028 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. chore(t) use 'strict' in Util.md

    Also ensure github-linguist does not parse this file as Raku.
    thibaultcha committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    4451e32 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2020

  1. feat(get) callback can now be 'nil' to probe L1/L2 caches

    Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
    
    Specifying a `nil` callback to `:get()` is now possible. Doing so will
    return any item from L1/L2 (and do the L2 -> L1 promotion as usual).
    
    If a requested key is not in the cache, the return values will be `nil,
    nil, -1`, where -1 is a new meaning for the `hit_lvl` return value
    indicating a cache miss. This is helpful when trying to distinguish a
    *negative hit* (cached `nil`) from a regular *miss* (no value). The
    former will have a positive `hit_lvl` indicating the negative hit was
    cached in L1/L2).
    
    Example:
    
        local val, err, hit_lvl = cache:get("key")
        if val == nil then
            if hit_lvl == -1 then
                -- miss (no value)
            end
    
            -- negative hit (cached `nil`)
        end
    
    Thanks Hamish Forbes and Corina Purcarea for the feature proposal and
    patch.
    
    From #96
    hamishforbes authored and thibaultcha committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    5ad5126 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cdb0489 View commit details
    Browse the repository at this point in the history
  3. chore(ci) add OpenResty 1.17.8.x to the tests matrix

    lua-resty-lru's `get()` now returns a third value `flags` in 1.17.8.x.
    thibaultcha committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    d0e1c02 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    07d20ec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    75bc831 View commit details
    Browse the repository at this point in the history
  6. tests(get) enable the 'opts' validation test

    This test should have been enabled a long time ago already.
    thibaultcha committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    0a690a6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4e8f5b9 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2020

  1. feat(ipc) avoid new workers attempting to replay evicted events

    A follow-up to #88.
    
    Described in #93 and reported a few months ago is the likely possibility
    that mlcache and ipc instances are created in the `init` phase. If a
    worker is to be started much later in the master process' lifetime, the
    newly forked ipc instance will have an `idx` attribute set to the
    shm_idx value at the time of `init` (likely 0). These workers will
    resume polling evicted events, and `poll()` will likely timeout
    indefinitely from there.
    
    For the fix in #88 to work, the mlcache instance has to be instantiated
    during `init_worker` or later.
    
    This patch proposes an approach which works for instances created in
    both `init` and `init_worker`: as soon as the ipc shm has started
    evicting items, we guarantee that future workers will resume polling at
    the current index, without having to call any method but `poll()`.
    
    Fix #93
    thibaultcha committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    1a5bd4a View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2020

  1. Configuration menu
    Copy the full SHA
    3a6b051 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8096940 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23662c9 View commit details
    Browse the repository at this point in the history
  4. release: 2.5.0

    thibaultcha committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    acf6d6e View commit details
    Browse the repository at this point in the history
Loading