code: private void cacheData(@NonNull final KeyType key, @NonNull final DataType data) {
          synchronized (cache) {
              if (useCache) {
                  cache.put(key, data);
              }
          }
      }
docs: Adds the data, which corresponds to a specific key, to the cache, if caching is enabled.
  
  @param key
  The key of the data, which should be added to the cache, as an instance of the
  generic type KeyType. The key may not be null
  @param data
  The data, which should be added to the cache, as an instance of the generic type
  DataType. The data may not be null