cache_cli.rb 361 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. require_relative '../../config/boot'
  3. require_relative '../../config/environment'
  4. require_relative 'cli_helper'
  5. module Mastodon
  6. class CacheCLI < Thor
  7. def self.exit_on_failure?
  8. true
  9. end
  10. desc 'clear', 'Clear out the cache storage'
  11. def clear
  12. Rails.cache.clear
  13. say('OK', :green)
  14. end
  15. end
  16. end