dev_aliyun_beta
p31729568 5 years ago
parent 3090fb2928
commit 4d90ed752b

@ -2,7 +2,7 @@ module Util::Redis
class << self class << self
def online_user_count def online_user_count
if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore)
Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.size Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size
end end
end end
end end

Loading…
Cancel
Save