anchor.diff:      {reply, Sz, Cache};
   
   handle_call(purge, _From, Cache) ->
  -    lists:foreach(fun(Key) ->
  -                          remove_item(Key, Cache)
  -                  end, Cache#cache.evict_list),
  -    {reply, ok, Cache#cache{evict_list=[]}};
  +    {reply, ok, Cache#cache{items=#{}, evict_list=[]}};
   
   handle_call(info, _From, Cache) ->
       #cache{size=Max, evict_list=EvictList} = Cache,
  
positive.code: %% @doc adds a value to the cache.  Returns true if an eviction occured.
  -spec add(Cache::pid(), Key::term(), Value::term()) -> true | false.
  add(Cache, Key, Value) ->
      Entry = {Key, Value},
      call(Cache, {add, Entry}).
  
  %% @doc lookup a key's value from the cache. Return undefined if it's not
  %% found.
  
negative.code: %% @private
  init([Size, Opts]) ->
      EvictFun = proplists:get_value(evict_fun, Opts),
  
      {ok, #cache{size = Size,
                  evict_list = [],
                  items = #{},
                  evict_fun = EvictFun}}.
  
  
  %% @private
  handle_call({add, Key, Value}, From, Cache) ->
      #cache{items=Items, evict_list=Evicted} = Cache,
  
      case maps:find(Key, Items) of
          error ->
              %% add new item
              Items2 = maps:put(Key, Value, Items),
              Evicted2 = push_front(Evicted, {Key, Value}),
              Cache1 = Cache#cache{items=Items2, evict_list=Evicted2},
              %% check if the size is not exceeded
              if
                  length(Evicted2) > Cache#cache.size ->
                      gen_server:reply(From, true),
                      {noreply, remove_oldest1(Cache1)};
                  true ->
                      {reply, false, Cache1}
              end;
          {ok, _Value} ->
              gen_server:reply(From, false),
              %% add new value
              Items2 = maps:put(Key, Value, Items),
              %% move old entry to front
              Evicted2 = move_front(Evicted, {Key, Value}),
              {noreply, Cache#cache{items=Items2, evict_list=Evicted2}}
      end;
  
  
  handle_call({get, Key, Default}, _From, Cache) ->
      case maps:find(Key, Cache#cache.items) of
          {ok, Value} ->
              Evicted2 =  move_front(Cache#cache.evict_list, {Key, Value}),
              {reply, Value, Cache#cache{evict_list=Evicted2}};
          error ->
              {reply, Default, Cache}
      end;
  
  handle_call({peek, Key, Default}, _From, Cache) ->
      {reply, maps:get(Key, Cache#cache.items, Default), Cache};
  
  handle_call({contains, Key}, _From, Cache) ->
      {reply, maps:is_key(Key, Cache#cache.items), Cache};
  
  handle_call({contains_or_add, Key, Value}, From, Cache) ->
      case maps:is_key(Key, Cache#cache.items) of
          false ->
              #cache{items=Items, evict_list=Evicted} = Cache,
              Items2 = maps:put(Key, Value, Items),
              Evicted2 = push_front(Evicted, {Key, Value}),
              Cache1 = Cache#cache{items=Items2, evict_list=Evicted2},
              if
                  length(Evicted2) > Cache#cache.size ->
                      gen_server:reply(From, {false, true}),
                      {noreply, remove_oldest1(Cache1)};
                  true ->
                      {reply, {false, false}, Cache1}
              end;
          true ->
              {reply, {true, false}, Cache}
      end;
  
  