code: public void putService(K serviceName, V service){
          if(cache.containsKey(serviceName)){
              cache.remove(serviceName);
          }
          cache.put(serviceName, service);
      }
docs: Put a service into cache.
  
  @param serviceName
  the service name.
  @param service
  the service.