Directus as Admin-Only Backend with Spring Boot API Gateway: Cache Invalidation Strategy?

Hello Directus Community,

I’m setting up an architecture where:

  1. Directus is used only for the Admin/CMS interface.

  2. A Spring Boot application acts as the main API Gateway/Custom Backend for all client traffic, writing directly to the shared database.

My concern is Directus’s internal data cache. If Spring Boot writes data directly to the DB (bypassing the Directus API), content managers may see stale data in the Admin Panel.

My Questions:

  1. What is the recommended method to force Directus to invalidate its cache after an external write operation (e.g., using the /utils/cache/clear API)?

  2. In a similar Admin-Only + Custom API setup, have others found it best to route all CMS-related writes through the Directus API just to ensure automatic cache clearing?

Any experience or best practices for this setup would be helpful! Thank you.

Either of those will achieve what you’re looking for! It really depends on what makes the most sense in your stack architecture specifically. Option 2 will perform the same as option 1, there’s also an option 3 where you disable the data cache altogether, but that will obviously put more strain on the database as everything is loaded fresh all the time