Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Add some `just` recipes for the Redis cache service (#3538)

Dhruv Bhanushali2b10598213fd
diff --git a/docker/cache/justfile b/docker/cache/justfile
new file mode 100644
index 000000000..eb0bcb846
--- /dev/null
+++ b/docker/cache/justfile
@@ -0,0 +1,22 @@
+set dotenv-load := false
+
+COLOR := "\\033[0;32m"
+NO_COLOR := "\\033[0m"
+
+# Show all available recipes
+@_default:
+ printf "\n{{ COLOR }}# Cache (path: \`docker/cache/\`)\n"
+ printf "==============================={{ NO_COLOR }}\n"
+ just --list --unsorted
+
+#######
+# CLI #
+#######
+
+# Open the Redis CLI as an interactive REPL
+cli *args:
+ just ../../exec cache redis-cli {{ args }}
+
+# Delete all data cached in Redis
+flushall:
+ just cli FLUSHALL
diff --git a/justfile b/justfile
index 826666043..e15881521 100644
--- a/justfile
+++ b/justfile
@@ -13,6 +13,7 @@ DC_USER := env_var_or_default("DC_USER", "opener")
# Show all available recipes, also recurses inside nested justfiles
@_default:
just --list --unsorted
+ cd docker/cache && just
cd docker/nginx && just
cd docker/es && just
cd catalog && just