anchor.diff:  handle_call(Msg, _From, State) ->
       {stop, {unknown_call, Msg}, State}.
   
  -
   %% Handle the down message from a stopped session, remove it from the session admin
   handle_info({'DOWN', _MonitorRef, process, Pid, _Info}, State) ->
       State1 = erase_session_pid(Pid, State),
  
positive.code: %% @spec init(SiteProps) -> {ok, State}
  %% @doc Initialize the session server with an empty session table.  We make the session manager a system process
  %%      so that crashes in sessions are isolated from each other.
  init(_SiteProps) ->
      State = #session_srv{key2pid=dict:new(), pid2key=dict:new(), persist2pid=dict:new(), pid2persist=dict:new()},
      timer:apply_interval(?SESSION_CHECK_EXPIRE * 1000, ?MODULE, tick, [self()]),
      process_flag(trap_exit, true),
      {ok, State}.
  
negative.code: handle_info(_Msg, State) -> 
      {noreply, State}.
  
  %% Apply Function to all sessions. The function application is spawned to support slow
  %% running functions and to protect the session manager from crashes.
  handle_cast({foreach, Function}, #session_srv{context=Context, pid2key=Pid2Key} = State) ->
      SesPids = dict:fetch_keys(Pid2Key),
  	if 
  		is_function(Function, 1) ->
  		    spawn(fun() -> lists:foreach(fun(Pid) -> Function(Pid) end, SesPids) end);
  		is_function(Function, 2) ->
  		    spawn(fun() -> lists:foreach(fun(Pid) -> Function(Pid, Context#context{session_pid=Pid}) end, SesPids) end)
  	end,
      {noreply, State};
  
  handle_cast(_Msg, State) -> {noreply, State}.
  