Caching Web Client in Vert.x

498 Views Asked by At

This is the architecture I am trying to build where I first check in Redis cache and incase of a cache miss go to downstream. Found Caching web client in vert x 4.2.0 and newer version but does that allow us to communicate with Redis cache or it works with in-memory cache only ? Also any suggestions to achieve this are welcome.

Architecture

1

There are 1 best solutions below

0
Paulo Lopes On BEST ANSWER

currently vert.x web client doesn't have any redis based caching implementation, yet nothing really stops one from quickly building one.

The important bit is the interface io.vertx.ext.web.client.spi.CacheStore. A custom implementation that stores data in redis would sufice to get your architecture complete.

Currently, vert.x web client offers a local in-memory cache or a SharedData based cache, usefull for sharing data across verticles.

If one would follow the shared data implementation as a blueprint, supporting redis would be a nice good first contribution project.