From 9691c98862067a136144e7e4b0fe93e187f7d624 Mon Sep 17 00:00:00 2001 From: glaszig Date: Fri, 27 May 2022 16:58:48 -0300 Subject: [PATCH] decouple default port number from memcache library --- lib/amnesia/host.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/amnesia/host.rb b/lib/amnesia/host.rb index 64b5028..fdeecb7 100644 --- a/lib/amnesia/host.rb +++ b/lib/amnesia/host.rb @@ -4,9 +4,10 @@ module Amnesia class Host FLOAT_STATS = %w[ rusage_user rusage_system ] STRING_STATS = %w[ version libevent ] + DEFAULT_PORT = 11_211 def self.normalize_address address - return "#{address}:#{Dalli::Server::DEFAULT_PORT}" unless address.include? ":" + return "#{address}:#{DEFAULT_PORT}" unless address.include? ":" address end