You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2017/06/02 07:09:31 UTC

ets-lru commit: updated refs/heads/559-disable-ddoc-cache to 80cc7e1

Repository: couchdb-ets-lru
Updated Branches:
  refs/heads/559-disable-ddoc-cache [created] 80cc7e1a2


Allow an ets_lru to be completely disabled


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ets-lru/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ets-lru/commit/80cc7e1a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ets-lru/tree/80cc7e1a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ets-lru/diff/80cc7e1a

Branch: refs/heads/559-disable-ddoc-cache
Commit: 80cc7e1a21e35a643c7b9f26b9939ac6af0cc5ce
Parents: c05488c
Author: Joan Touzet <jo...@atypical.net>
Authored: Fri Jun 2 03:09:13 2017 -0400
Committer: Joan Touzet <jo...@atypical.net>
Committed: Fri Jun 2 03:09:13 2017 -0400

----------------------------------------------------------------------
 src/ets_lru.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ets-lru/blob/80cc7e1a/src/ets_lru.erl
----------------------------------------------------------------------
diff --git a/src/ets_lru.erl b/src/ets_lru.erl
index 0c94e17..7a366ba 100644
--- a/src/ets_lru.erl
+++ b/src/ets_lru.erl
@@ -326,11 +326,11 @@ next_timeout(St) ->
 
 set_options(St, []) ->
     St;
-set_options(St, [{max_objects, N} | Rest]) when is_integer(N), N > 0 ->
+set_options(St, [{max_objects, N} | Rest]) when is_integer(N), N >= 0 ->
     set_options(St#st{max_objs=N}, Rest);
-set_options(St, [{max_size, N} | Rest]) when is_integer(N), N > 0 ->
+set_options(St, [{max_size, N} | Rest]) when is_integer(N), N >= 0 ->
     set_options(St#st{max_size=N}, Rest);
-set_options(St, [{max_lifetime, N} | Rest]) when is_integer(N), N > 0 ->
+set_options(St, [{max_lifetime, N} | Rest]) when is_integer(N), N >= 0 ->
     set_options(St#st{max_lifetime=N}, Rest);
 set_options(_, [Opt | _]) ->
     throw({invalid_option, Opt}).