Dalli v2.7.0 Release Notes

    • ๐Ÿ’ฅ BREAKING CHANGE: Dalli::Client#add and #replace now return a truthy value, not boolean true or false.
    • ๐Ÿ‘ Multithreading support with dalli_store: Use :pool_size to create a pool of shared, threadsafe Dalli clients in Rails:

      config.cache_store = :dalli_store, "cache-1.example.com", "cache-2.example.com", :compress => true, :pool_size => 5, :expires_in => 300
      

      This will ensure the Rails.cache singleton does not become a source of contention. PLEASE NOTE Rails's :mem_cache_store does not support pooling as of ๐Ÿš… Rails 4.0. You must use :dalli_store.

    • Implement version for retrieving version of connected servers [dterei, #384]

    • Implement fetch_multi for batched read/write [sorentwo, #380]

    • โž• Add more support for safe updates with multiple writers: [philipmw, #395] require 'dalli/cas/client' augments Dalli::Client with the following methods:

      • Get value with CAS: [value, cas] = get_cas(key) get_cas(key) {|value, cas| ...}
      • Get multiple values with CAS: get_multi_cas(k1, k2, ...) {|value, metadata| cas = metadata[:cas]}
      • Set value with CAS: new_cas = set_cas(key, value, cas, ttl, options)
      • Replace value with CAS: replace_cas(key, new_value, cas, ttl, options)
      • Delete value with CAS: delete_cas(key, cas)
    • ๐Ÿ›  Fix bug with get key with "Not found" value [uzzz, #375]