mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add stats method on RedisCacheStore similar to MemCacheStore
This commit is contained in:
parent
96446a9708
commit
c8934f3c02
2 changed files with 9 additions and 0 deletions
|
@ -6,5 +6,9 @@
|
|||
|
||||
*Ritikesh G*
|
||||
|
||||
* add `RedisCacheStore#stats` method similar to `MemCacheStore#stats`. Calls `redis#info` internally.
|
||||
|
||||
*Ritikesh G*
|
||||
|
||||
|
||||
Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/activesupport/CHANGELOG.md) for previous changes.
|
||||
|
|
|
@ -319,6 +319,11 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
|
||||
# Get info from redis servers.
|
||||
def stats
|
||||
redis.with { |c| c.info }
|
||||
end
|
||||
|
||||
def mget_capable? #:nodoc:
|
||||
set_redis_capabilities unless defined? @mget_capable
|
||||
@mget_capable
|
||||
|
|
Loading…
Reference in a new issue