anchor.diff:  -export([start_link/0]).
   
   -export([read/1,   %% (Name) -> {ok, Value} | error
  +	 read/5,   %% (Name, Mod, Type, Ref, DataPoints) ->
  +	           %%     {ok,Value} | unavailable
   	 write/2,  %% (Name, Value) -> ok
   	 write/3,  %% (Name, Value, TTL) -> ok
   	 delete/1
  
positive.code: handle_cast(_, S) ->
      {noreply, S}.
  
  
  handle_info({timeout, Ref, {name, Name}}, S) ->
      ets:select_delete(
        ?TABLE, [{#cache{name = Name, tref = Ref, _='_'}, [], [true]}]),
  
negative.code: 	    {ok, Val};
  	[] ->
  	    error
      end.
  
  read(Name, M, Type, Ref, DataPoints) ->
      case ets:lookup(?TABLE, Name) of
  	[#cache{value = Val}] ->
  	    {ok, Val};
  	[] ->
  	    gen_server:call(
  	      ?MODULE, {get_value, Name, M, Type, Ref, DataPoints},
  	      5*60*1000)  % 5-minute timeout should really be enough
      end.
  
  write(Name, Value) ->
  