diff --git a/core/Command/Memcache/DistributedGet.php b/core/Command/Memcache/DistributedGet.php
new file mode 100644
index 00000000000..bf1b00d312d
--- /dev/null
+++ b/core/Command/Memcache/DistributedGet.php
@@ -0,0 +1,40 @@
+setName('memcache:distributed:get')
+ ->setDescription('Get a value from the distributed memcache')
+ ->addArgument('key', InputArgument::REQUIRED, 'The key to retrieve');
+ parent::configure();
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int {
+ $cache = $this->cacheFactory->createDistributed();
+ $key = $input->getArgument('key');
+
+ $value = $cache->get($key);
+ $this->writeMixedInOutputFormat($input, $output, $value);
+ return 0;
+ }
+}
diff --git a/core/Command/Memcache/DistributedSet.php b/core/Command/Memcache/DistributedSet.php
new file mode 100644
index 00000000000..0f31c22f730
--- /dev/null
+++ b/core/Command/Memcache/DistributedSet.php
@@ -0,0 +1,57 @@
+setName('memcache:distributed:set')
+ ->setDescription('Set a value in the distributed memcache')
+ ->addArgument('key', InputArgument::REQUIRED, 'The key to set')
+ ->addArgument('value', InputArgument::REQUIRED, 'The value to set')
+ ->addOption(
+ 'type',
+ null,
+ InputOption::VALUE_REQUIRED,
+ 'Value type [string, integer, float, boolean, json, null]',
+ 'string'
+ );
+ parent::configure();
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int {
+ $cache = $this->cacheFactory->createDistributed();
+ $key = $input->getArgument('key');
+ $value = $input->getArgument('value');
+ $type = $input->getOption('type');
+ ['value' => $value, 'readable-value' => $readable] = $this->castHelper->castValue($value, $type);
+ if ($cache->set($key, $value)) {
+ $output->writeln('Distributed cache key ' . $key . ' set to ' . $readable . '');
+ return 0;
+ } else {
+ $output->writeln('Failed to set cache key ' . $key . '');
+ return 1;
+ }
+ }
+}