anchor.diff:          error  ->
               false
       end.
  +
  +%% @doc Garbage collect the snapshot cache. 
  +snapshot_gc(SnapshotDict)-> 
  +	case (orddict:size(SnapshotDict))==?SNAPSHOT_THRESHOLD of 
  +	true ->
  +		lager:info("pruning the following snapshot cache: ~p",[SnapshotDict]),
  +		Pruned=orddict:from_list(lists:sublist(orddict:to_list(SnapshotDict), ?SNAPSHOT_THRESHOLD-?SNAPSHOT_MIN, ?SNAPSHOT_MIN)),
  +		lager:info("Result is: ",[Pruned]),
  +		Pruned;
  +	false ->
  +		lager:info("NO NEED OF pruning the following snapshot cache: ~p",[SnapshotDict]),
  +		SnapshotDict
  +	end.
  +
  +%% @doc Garbage collect the operations cache. 
  +ops_gc(OpsDict)-> 
  +    OpsDict.
  +    
  +    
  +    
  
positive.code: 
  -include("floppy.hrl").
  -include_lib("riak_core/include/riak_core_vnode.hrl").
  
  -export([start_vnode/1,
           read/3,
  
negative.code:             		TxId = LastOp#clocksi_payload.txid,
  					{ok, Snapshot} = clocksi_materializer:update_snapshot(Type, LatestSnapshot, SnapshotTime, [H|T], TxId),
  					CommitTime = LastOp#clocksi_payload.commit_time,
  					lager:info("previous snapshots are = ~p, ",[SnapshotDict]),
  					lager:info("materialiser_vnode: caching new snapshot= ~p, snapshot committed with time:~p.", [Snapshot,CommitTime]),
  					lager:info("previous snapshots are = ~p, ",[orddict:store(CommitTime,Snapshot, SnapshotDict)]),
  					ets:insert(SnapshotCache, {Key, snapshot_gc(orddict:store(CommitTime,Snapshot, SnapshotDict))}),
  					lager:info("new snapshots are = ~p, ",[ets:lookup(SnapshotCache, Key)])
  				end
              end
      end,
  	lager:info("materialiser_vnode: snapshot: ~p", [Snapshot]),
  	{reply, {ok, Snapshot}, State};
  	%TODO: trigger the GC mechanism asynchronously
  	%{async, snapshot_gc(), Sender, State};
  
  handle_command({update, Key, DownstreamOp}, _Sender,
                 State = #state{ops_cache = OpsCache})->
  