MARUGOSHI.ORG

Override memcached page limit with dalli

Even being replaced by redis, memcached is still useful caching system.

Abobe version 1.4, memcached can change slab page limit from 1MB, but with dalli gem, memcached client library, it must configure both memcached and dalli’s setting.

$ cat /etc/memcached.conf
-- snip --
-I 2m

Abobe rails 3.2.x exsample.

# Rails.root/config/environments/production.rb or elsewhere
config.cache_store = :dalli_store, "cache-server:11211", { value_max_bytes: 2000000 }