SiberianGuy
SiberianGuy

Reputation: 25312

Architecture of caching integration

I have repositories and services that wrap them. Now I need to integrate caching for some places and I want to ask your advice.

I see two ways.

  1. Integrate caching into existing services. But it will make services hard to test.
  2. Create extra services layer for caching. It looks better for testing but at the same time more difficult to build and maintain.

Upvotes: 1

Views: 106

Answers (1)

xaxxon
xaxxon

Reputation: 19761

Without more detail on what the repositories are or do, I'd recommend a separate tier for your caching.

This allows you to scale your service and the cache separately as appropriate without having to scale both in order to scale one.

Work on automating your build, test, and deploy systems so that it's no more work to have the additional layers.

Upvotes: 1

Related Questions