Add an explicit to_i on the ttl value, as in Rails 4.2 this will often be an ActiveSupport::Duration value instead of a Fixnum.
Merge pull request #494 from petergoldstein/feature/explicit_to_i_on_ttl

Add an explicit to_i on the ttl value