anchor.diff:  
   %% @spec tick(pid()) -> void()
   %% @doc Periodic tick used for cleaning up sessions
  -tick(Pid) when is_pid(Pid) ->
  -    gen_server:cast(Pid, tick).
  +tick(SessionManager) when is_pid(SessionManager) ->
  +    Tick = z_utils:now(),
  +    foreach(fun(Pid) -> z_session:check_expire(Tick, Pid) end, SessionManager).
  +
  +%% @spec foreach(?) -> void()
  +%% @doc Apply function to all sessions
  +foreach(Function, #context{session_manager=SessionManager}) when is_function(Function) ->
  +    foreach(Function, SessionManager);
  +foreach(Function, SessionManager) when is_function(Function) ->
  +    gen_server:cast(SessionManager, {foreach, Function}).
   
   %% @spec broadcast(#broadcast, Context) -> ok
   %% @doc Broadcast a notification message to all open sessions.
  
positive.code:     count/1, 
      dump/1, 
      tick/1,
      broadcast/2
  ]).
  
  -include_lib("zotonic.hrl").
  
  %% The session server state
  -record(session_srv, {key2pid, pid2key, persist2pid, pid2persist}).
  
  
  %% @spec start_link(SiteProps) -> {ok,Pid} | ignore | {error,Error}
  
negative.code: 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),
  