code: private void updateCache(int index, QueryParameters params) {
          if (generatedCacheMap.containsKey(index) == true) {
              this.generatedCacheMap.put(index, params);
          } else {
              this.resultSetCacheMap.put(index, params);
          }
      }
docs: Updates value in cache.
  After cache update - cache trim is performed {@link LinkedHashMap#removeEldestEntry(java.util.Map.Entry)}
  
  @param index  index at which the specified element is to be inserted
  @param params element to be inserted