开发者

Architecture of caching integration

I have repositories and services that wrap them. Now I need to in开发者_如何学JAVAtegrate 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜