summaryrefslogtreecommitdiff
path: root/test/support/cachex_proxy.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-01-06 15:22:35 -0600
committerAlex Gleason <alex@alexgleason.me>2021-01-06 15:22:35 -0600
commit1438fd958325c3d469315c478f06def9e4dd0de3 (patch)
tree738e7e9ce8e0e0af89d9dff411191643cbf45aab /test/support/cachex_proxy.ex
parent2aeb229de3f59e1704c633c31415e7e834f6ba67 (diff)
parent5e128a6be30563adc3b8a938aa68d18ac04cdfa0 (diff)
downloadpleroma-1438fd958325c3d469315c478f06def9e4dd0de3.tar.gz
pleroma-1438fd958325c3d469315c478f06def9e4dd0de3.zip
Merge remote-tracking branch 'upstream/develop' into block-behavior
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..e296b5c6a
--- /dev/null
+++ b/test/support/cachex_proxy.ex
@@ -0,0 +1,40 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 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