Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
8025a41a
Unverified
Commit
8025a41a
authored
6 years ago
by
Eugen Rochko
Committed by
GitHub
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Add `tootctl cache clear` (#10689)
parent
5f9f610a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/cli.rb
+4
-0
lib/cli.rb
lib/mastodon/cache_cli.rb
+19
-0
lib/mastodon/cache_cli.rb
with
23 additions
and
0 deletions
+23
-0
lib/cli.rb
+
4
-
0
View file @
8025a41a
...
...
@@ -9,6 +9,7 @@ require_relative 'mastodon/search_cli'
require_relative
'mastodon/settings_cli'
require_relative
'mastodon/statuses_cli'
require_relative
'mastodon/domains_cli'
require_relative
'mastodon/cache_cli'
require_relative
'mastodon/version'
module
Mastodon
...
...
@@ -41,6 +42,9 @@ module Mastodon
desc
'domains SUBCOMMAND ...ARGS'
,
'Manage account domains'
subcommand
'domains'
,
Mastodon
::
DomainsCLI
desc
'cache SUBCOMMAND ...ARGS'
,
'Manage cache'
subcommand
'cache'
,
Mastodon
::
CacheCLI
option
:dry_run
,
type: :boolean
desc
'self-destruct'
,
'Erase the server from the federation'
long_desc
<<~
LONG_DESC
...
...
This diff is collapsed.
Click to expand it.
lib/mastodon/cache_cli.rb
0 → 100644
+
19
-
0
View file @
8025a41a
# frozen_string_literal: true
require_relative
'../../config/boot'
require_relative
'../../config/environment'
require_relative
'cli_helper'
module
Mastodon
class
CacheCLI
<
Thor
def
self
.
exit_on_failure?
true
end
desc
'clear'
,
'Clear out the cache storage'
def
clear
Rails
.
cache
.
clear
say
(
'OK'
,
:green
)
end
end
end
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets