diff --git a/README.md b/README.md index 99adad14..eedfda91 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Configuration ------------------------ Dalli::Client accepts the following options. All times are in seconds. -**expires_in**: Global default for key TTL. No default. +**expires_in**: Global default for key TTL. Default is 0, which means no expiry. **failover**: Boolean, if true Dalli will failover to another server if the main server for a key is down. diff --git a/lib/dalli/ring.rb b/lib/dalli/ring.rb index 5ee0af0d..11c23402 100644 --- a/lib/dalli/ring.rb +++ b/lib/dalli/ring.rb @@ -79,9 +79,9 @@ def entry_count_for(server, total_servers, total_weight) inline do |builder| builder.c <<-EOM int binary_search(VALUE ary, unsigned int r) { - int upper = RARRAY_LEN(ary) - 1; - int lower = 0; - int idx = 0; + long upper = RARRAY_LEN(ary) - 1; + long lower = 0; + long idx = 0; ID value = rb_intern("value"); VALUE continuumValue; unsigned int l;