summaryrefslogtreecommitdiff
path: root/test/support/cachex_proxy.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
committerAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
commit52fc59f125c10ad73b9fd1a0639b6dc5681776ca (patch)
tree7de32329acbdd4bdf5c753678a2d459c61b58d80 /test/support/cachex_proxy.ex
parenta8fa00ef666f574aec8048626aed78a7d62e6915 (diff)
parent377f84f3678f9c2541fbd4a200cd93c5ab0dea24 (diff)
downloadpleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.tar.gz
pleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.zip
Merge remote-tracking branch 'upstream/develop' into earmark
Diffstat (limited to 'test/support/cachex_proxy.ex')
-rw-r--r--test/support/cachex_proxy.ex40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/support/cachex_proxy.ex b/test/support/cachex_proxy.ex
new file mode 100644
index 000000000..de1f1c766
--- /dev/null
+++ b/test/support/cachex_proxy.ex
@@ -0,0 +1,40 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.CachexProxy do
+ @behaviour Pleroma.Caching
+
+ @impl true
+ defdelegate get!(cache, key), to: Cachex
+
+ @impl true
+ defdelegate stream!(cache, key), to: Cachex
+
+ @impl true
+ defdelegate put(cache, key, value, options), to: Cachex
+
+ @impl true
+ defdelegate put(cache, key, value), to: Cachex
+
+ @impl true
+ defdelegate get_and_update(cache, key, func), to: Cachex
+
+ @impl true
+ defdelegate get(cache, key), to: Cachex
+
+ @impl true
+ defdelegate fetch!(cache, key, func), to: Cachex
+
+ @impl true
+ defdelegate expire_at(cache, str, num), to: Cachex
+
+ @impl true
+ defdelegate exists?(cache, key), to: Cachex
+
+ @impl true
+ defdelegate del(cache, key), to: Cachex
+
+ @impl true
+ defdelegate execute!(cache, func), to: Cachex
+end