couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] chttpd commit: updated refs/heads/master to 6b18a8e
Date Tue, 08 Sep 2015 14:28:21 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 841ee1afe -> 6b18a8e6e


remove tabs


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/9496363a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/9496363a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/9496363a

Branch: refs/heads/master
Commit: 9496363a648d3e87b4189fd6d81b771788d758c8
Parents: 841ee1a
Author: Robert Newson <rnewson@apache.org>
Authored: Tue Sep 8 13:49:18 2015 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Sep 8 13:49:18 2015 +0100

----------------------------------------------------------------------
 src/chttpd_auth_cache.erl | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/9496363a/src/chttpd_auth_cache.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_auth_cache.erl b/src/chttpd_auth_cache.erl
index 61ee472..843be34 100644
--- a/src/chttpd_auth_cache.erl
+++ b/src/chttpd_auth_cache.erl
@@ -70,21 +70,21 @@ update_user_creds(_Req, UserDoc, _Ctx) ->
 
 get_from_cache(UserName) ->
     try ets_lru:lookup_d(?CACHE, UserName) of
-	{ok, Props} ->
-	    couch_stats:increment_counter([couchdb, auth_cache_hits]),
-	    couch_log:debug("cache hit for ~s", [UserName]),
-	    Props;
-	_ ->
-	    Props = load_user_from_db(UserName),
-	    couch_stats:increment_counter([couchdb, auth_cache_misses]),
-	    couch_log:debug("cache miss for ~s", [UserName]),
-	    ets_lru:insert(?CACHE, UserName, Props),
-	    Props
+        {ok, Props} ->
+            couch_stats:increment_counter([couchdb, auth_cache_hits]),
+            couch_log:debug("cache hit for ~s", [UserName]),
+            Props;
+        _ ->
+            Props = load_user_from_db(UserName),
+            couch_stats:increment_counter([couchdb, auth_cache_misses]),
+            couch_log:debug("cache miss for ~s", [UserName]),
+            ets_lru:insert(?CACHE, UserName, Props),
+            Props
     catch
-	error:badarg ->
-	    couch_stats:increment_counter([couchdb, auth_cache_misses]),
-	    couch_log:debug("cache miss for ~s", [UserName]),
-	    load_user_from_db(UserName)
+        error:badarg ->
+            couch_stats:increment_counter([couchdb, auth_cache_misses]),
+            couch_log:debug("cache miss for ~s", [UserName]),
+            load_user_from_db(UserName)
     end.
 
 %% gen_server callbacks


Mime
View raw message