method

truncate_key

Importance_0
v7.1.3.2 - 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 412
        def truncate_key(key)
          if key && key.bytesize > max_key_bytesize
            suffix = ":hash:#{ActiveSupport::Digest.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.