Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into topic_bank
commit
363a454d1a
@ -0,0 +1,9 @@
|
||||
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
|
Loading…
Reference in new issue