equal
deleted
inserted
replaced
68 if not user then return nil; end |
68 if not user then return nil; end |
69 if not key then return nil; end |
69 if not key then return nil; end |
70 if not stores[user] then stores[user] = cache.new(max_entries, evict_callback); end |
70 if not stores[user] then stores[user] = cache.new(max_entries, evict_callback); end |
71 stores[user]:set(key, value); |
71 stores[user]:set(key, value); |
72 -- remove empty caches completely |
72 -- remove empty caches completely |
73 if not stores[user]:count() then stores[user] = nil; end |
73 if stores[user]:count() == 0 then stores[user] = nil; end |
74 end; |
74 end; |
75 }; |
75 }; |
76 end |
76 end |
77 local old_session_registry = init_session_cache(max_old_sessions, nil); |
77 local old_session_registry = init_session_cache(max_old_sessions, nil); |
78 local session_registry = init_session_cache(max_hibernated_sessions, function(resumption_token, session) |
78 local session_registry = init_session_cache(max_hibernated_sessions, function(resumption_token, session) |