anchor.diff:  cleaner_loop(_, Cleaner) ->
       Cleaner.
   
  -submit_buckets_reset(Pid, BucketNames) ->
  +submit_new_buckets(Pid, Buckets0) ->
       work_queue:submit_work(
         Pid,
         fun () ->
  -              [ets:delete(bucket_info_cache, Name) || Name <- BucketNames],
  +              Buckets = lists:sort(Buckets0),
  +              BucketNames = compute_buckets_to_invalidate(Buckets),
  +              [begin
  +                   ets:delete(bucket_info_cache, Name),
  +                   ets:delete(bucket_info_cache_buckets, Name)
  +               end || Name <- BucketNames],
                 [gen_event:notify(bucket_info_cache_invalidations, Name) || Name <- BucketNames],
                 ok
         end).
  +
  +compute_buckets_to_invalidate(Buckets) ->
  +    CachedBuckets = ets:tab2list(bucket_info_cache_buckets),
  +    Inv = ordsets:subtract(CachedBuckets, Buckets),
  +    [BucketName || {BucketName, _} <- Inv].
   
   submit_full_reset() ->
       work_queue:submit_work(
         bucket_info_cache,
         fun () ->
                 ets:delete_all_objects(bucket_info_cache),
  +              ets:delete_all_objects(bucket_info_cache_buckets),
                 gen_event:notify(bucket_info_cache_invalidations, '*')
         end).
   
  
positive.code: cache_init() ->
      {ok, _} = gen_event:start_link({local, bucket_info_cache_invalidations}),
      ets:new(bucket_info_cache, [set, named_table]),
      Self = self(),
      ns_pubsub:subscribe_link(ns_config_events, fun cleaner_loop/2, {Self, []}),
      submit_full_reset().
  
  cleaner_loop({buckets, [{configs, NewBuckets0}]}, {Parent, CurrentBuckets}) ->
      NewBuckets = lists:sort(NewBuckets0),
      ToClean = ordsets:subtract(CurrentBuckets, NewBuckets),
      BucketNames  = [Name || {Name, _} <- ToClean],
      submit_buckets_reset(Parent, BucketNames),
      {Parent, NewBuckets};
  cleaner_loop({{_, _, capi_port}, _Value}, State) ->
      submit_full_reset(),
      State;
  
negative.code:               case ets:lookup(bucket_info_cache, BucketName) of
                    [] ->
                        case compute_bucket_info(BucketName) of
                            {ok, V, BucketConfig} ->
                                ets:insert(bucket_info_cache, {BucketName, V}),
                                ets:insert(bucket_info_cache_buckets, {BucketName, BucketConfig}),
                                {ok, V};
                            Other ->
                                %% note: we might consider caching
  