mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 11:50:49 +08:00
9 lines
242 B
Ruby
9 lines
242 B
Ruby
module Util::Redis
|
|
class << self
|
|
def online_user_count
|
|
if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore)
|
|
Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size
|
|
end
|
|
end
|
|
end
|
|
end |