public static void dropInstanceCache(String instanceName){
    LOG.info("removing all the keys for instanceName : {}", instanceName);
    for(Map<String,Object> cache : viewSingletonObjects.values()){
      for(Iterator<Map.Entry<String, Object>> it = cache.entrySet().iterator();it.hasNext();){
        Map.Entry<String, Object> entry = it.next();
        if(entry.getKey().startsWith(instanceName+":")){
          LOG.debug("removing key : {} ",entry.getKey());
          it.remove();
        }
      }
    }
  }
Drops all objects for give instance name.

@param instanceName : the name of the view instance for which the keys needs to be dropped.
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java