couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1064089 - /couchdb/trunk/src/couchdb/couch_auth_cache.erl
Date Thu, 27 Jan 2011 11:24:14 GMT
Author: fdmanana
Date: Thu Jan 27 11:24:14 2011
New Revision: 1064089

URL: http://svn.apache.org/viewvc?rev=1064089&view=rev
Log:
Trivial change: replace LruTime with MruTime

Modified:
    couchdb/trunk/src/couchdb/couch_auth_cache.erl

Modified: couchdb/trunk/src/couchdb/couch_auth_cache.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_auth_cache.erl?rev=1064089&r1=1064088&r2=1064089&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_auth_cache.erl (original)
+++ couchdb/trunk/src/couchdb/couch_auth_cache.erl Thu Jan 27 11:24:14 2011
@@ -171,9 +171,9 @@ handle_call({new_max_cache_size, NewSize
 handle_call({new_max_cache_size, NewSize}, _From, State) ->
     lists:foreach(
         fun(_) ->
-            LruTime = ets:last(?BY_ATIME),
-            [{LruTime, UserName}] = ets:lookup(?BY_ATIME, LruTime),
-            true = ets:delete(?BY_ATIME, LruTime),
+            MruTime = ets:last(?BY_ATIME),
+            [{MruTime, UserName}] = ets:lookup(?BY_ATIME, MruTime),
+            true = ets:delete(?BY_ATIME, MruTime),
             true = ets:delete(?BY_USER, UserName)
         end,
         lists:seq(1, State#state.cache_size - NewSize)
@@ -248,9 +248,9 @@ free_mru_cache_entry() ->
     case ets:last(?BY_ATIME) of
     '$end_of_table' ->
         ok;  % empty cache
-    LruTime ->
-        [{LruTime, UserName}] = ets:lookup(?BY_ATIME, LruTime),
-        true = ets:delete(?BY_ATIME, LruTime),
+    MruTime ->
+        [{MruTime, UserName}] = ets:lookup(?BY_ATIME, MruTime),
+        true = ets:delete(?BY_ATIME, MruTime),
         true = ets:delete(?BY_USER, UserName)
     end.
 



Mime
View raw message