+ m.reply "babelfish doesn't support translation from #{trans_from} to #{trans_to}"
+ end
+ end
+
+ def cache_mgmt(m, params)
+ cmd = params[:cmd].intern
+ case cmd
+ when :view
+ cache = []
+ @registry.each { |key, val|
+ cache << "%s => %s" % [key, val]
+ }
+ m.reply "translate cache: #{cache.inspect}"
+ when :clear
+ keys = []
+ @registry.each { |key, val|
+ keys << key
+ }
+ keys.each { |key|
+ @registry.delete(key)
+ }
+ cache_mgmt(m, :cmd => 'view')