add stats method on RedisCacheStore similar to MemCacheStore

This commit is contained in:
Ritikesh 2020-12-29 13:22:24 +05:30
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 @@ def clear(options = nil)
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