code: Flowable<Cache> cacheAll(final boolean invalidate) {
      return cacheLocales(invalidate)
          .flatMap(new Function<List<CDALocale>, Publisher<? extends Map<String, CDAContentType>>>() {
            @Override
            public Publisher<? extends Map<String, CDAContentType>> apply(List<CDALocale> locales) {
              return CDAClient.this.cacheTypes(invalidate);
            }
          })
          .map(new Function<Map<String, CDAContentType>, Cache>() {
            @Override
            public Cache apply(Map<String, CDAContentType> stringCDAContentTypeMap) {
              return cache;
            }
          });
    }
docs: Caching