code: public void setEnabled(String layerName, boolean enabled) {
          synchronized (this) {
              if (enabled)
                  layers.add(layerName);
              else
                  layers.remove(layerName);
          }
      }
docs: Enables/disables a layer for caching.
  
  @param layerName
  name of the WMS layer
  @param enabled
  is true if want to cache