code: public synchronized void put(WmsRequest request, byte[] image) {
          synchronized (this) {
              String key = getKey(request);
              // make sure it's the last on the list of keys so won't be dropped
              // from cache
              keys.remove(key);
              keys.add(key);
              if (keys.size() > maxSize)
                  remove(keys.get(0));
              if (maxSize > 0 && layers.containsAll(request.getLayers())) {
                  cache.put(key, image);
                  log.info("cached image with key=" + key);
              }
          }
      }
docs: Sets the cached image for the request.
  
  @param request
  the WMS http request
  @param image
  bytes of the image