Flowdock
method

truncate_key

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: RedisCacheStore
truncate_key(key) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 414
        def truncate_key(key)
          if key.bytesize > max_key_bytesize
            suffix = ":sha2:#{::Digest::SHA2.hexdigest(key)}"
            truncate_at = max_key_bytesize - suffix.bytesize
            "#{key.byteslice(0, truncate_at)}#{suffix}"
          else
            key
          end
        end
Register or log in to add new notes.