Using a standalone cache for frequently accessed items

In this recipe, we will see how to use a standalone cache for frequently accessed items. A cache is a temporary data store that will save the items in memory and will provide those from the memory itself instead of making a DynamoDB call. Make a note that this should be used for items, which you expect to not be changed frequently.

Getting ready

We will perform this recipe using Java libraries. So, the prerequisite is that you should have performed recipes, which use the AWS SDK for Java.

How to do it…

Here, we will be using the AWS SDK for Java, so create a Maven project with the SDK dependency. Apart from the SDK, we will also be using one of the most widely used open source caches, that is, ...

Get DynamoDB Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.