code: @Override
      public void insert(Key key, byte[] data) {
          ensureInitializedAndNotClosed();
          Timer timer = new Timer();
          byte[] serializedKey = key.serialize();
          try {
              this.database.get().put(this.writeOptions, serializedKey, data);
          } catch (RocksDBException ex) {
              throw convert(ex, "insert key '%s'", key);
          }
  
          RocksDBMetrics.insert(timer.getElapsedMillis(), serializedKey.length + ((data != null) ? data.length : 0));
      }
docs: region Cache Implementation