aboutsummaryrefslogtreecommitdiff
path: root/test/support/cachex_proxy.ex
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2021-01-18 11:56:40 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2021-01-18 11:56:40 +0300
commit2289a1d58777b8ed129e322c3ce4119bc129366c (patch)
tree693af643bfd94af28c29ec519ef8df0f208d7424 /test/support/cachex_proxy.ex
parentdbaa15232bfe4c2bc3e2b1a17cfc7503e7036d77 (diff)
parent732cc0ce46e8044909dd5205858c43f75fe3e937 (diff)
downloadpleroma-2289a1d58777b8ed129e322c3ce4119bc129366c.tar.gz
Merge branch 'develop' into refactor/uploads
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