frozen_string_literal: true
# Source: https://github.com/rails/rails | License: MIT
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true
gem "redis-client"
require "redis-client"
require "active_support/core_ext/hash/except"
require "active_support/core_ext/hash/keys"
module ActionCable
module SubscriptionAdapter
class Redis < Base # :nodoc:
prepend ChannelPrefix
# Overwrite this factory method for Redis connections if you want to use a
# different Redis library than the redis gem. This is needed, for example, when
# using Makara proxies for distributed Redis.
cattr_accessor :redis_connector, default: ->(config) do
config = config.except(:adapter, :channel_prefix)
config[:id] = "ActionCable-PID-#{$$}" unless config.key?(:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key