lib/adapters/cachetastic_adapters_memcache.rb in cachetastic-1.3.1 vs lib/adapters/cachetastic_adapters_memcache.rb in cachetastic-1.4.0

- old
+ new

@@ -53,9 +53,35 @@ puts e.backtrace.join("\n") return false end end + def stats + super + begin + puts "Memcache stats for all caches:" + memc = self.conn + puts Kernel.pp_to_s(memc.stats) + paths = `sh -c 'echo $PATH'` + paths = paths.split(':') + memcached_tool_found = false + paths.each do |path| + cmd_path = File.expand_path(File.join(path,'memcached_tool')) + if File.exists?(cmd_path) + memcached_tool_found = true + break + end + end + if memcached_tool_found + app_config.memcache_servers.each do |server| + puts `memcached_tool #{server}` + end + end + rescue + end + puts "" + end + protected attr_accessor :conn attr_accessor :version def namespace \ No newline at end of file