You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/11/11 23:42:31 UTC

[couchdb] 04/05: Add couch_expiring_cache module

This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a commit to branch expiring-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2ef0f5596db626853803d360e99829fadc687db8
Author: Jay Doane <ja...@apache.org>
AuthorDate: Mon Nov 11 15:32:17 2019 -0800

    Add couch_expiring_cache module
---
 src/couch_expiring_cache/src/couch_expiring_cache.erl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/couch_expiring_cache/src/couch_expiring_cache.erl b/src/couch_expiring_cache/src/couch_expiring_cache.erl
new file mode 100644
index 0000000..62b6367
--- /dev/null
+++ b/src/couch_expiring_cache/src/couch_expiring_cache.erl
@@ -0,0 +1,13 @@
+-module(couch_expiring_cache).
+
+-export([
+    lookup/2,
+    insert/5
+]).
+
+
+insert(Name, Key, Value, StaleTS, ExpiresTS) ->
+    couch_expiring_cache_fdb:insert(Name, Key, Value, StaleTS, ExpiresTS).
+
+lookup(Name, Key) ->
+    couch_expiring_cache_fdb:lookup(Name, Key).