DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Data
  4. Caching: Why You Should Care!

Caching: Why You Should Care!

What is caching, and why should you care? Learn why database caching is so essential, what object-relational mapping is, and deployment strategy.

Christoph Engelbert user avatar by
Christoph Engelbert
·
Jul. 16, 15 · Tutorial
Like (2)
Save
Tweet
Share
4.13K Views

Join the DZone community and get the full member experience.

Join For Free

What type of database should I use? What object-relational mapper? What deployment strategy? Sometimes even user interface is discussed and designed before writing the next killer application. Unfortunately, it is still quite common to forget  that those killer applications will quickly need to reach a critical mass. These days a critical mass is not just a few hundred or thousand people - more like millions!

Providing an architecture to keep up with growth and to allow easy scaling has to include caching in one way or another. Caching has to be part of the initial design and requires the same amount of brainpower as the database discussion. Introducing a clean caching layer afterwards is often as complex as rewriting the system to feature it in the first place.

After realizing you’ll need caching at some point and that it's easier to introduce sooner rather than later, you'll wonder: What exactly is a cache?

A cache is commonly a component (internal or external to the application) used to store and provide fast access to portions of datasets. These datasets are called hot data, because they are used often or have been used recently. There are two types of caches. The first is information that otherwise would either take a long to time to calculate/process. The second originates from another underlying external resource. For this, caches speed up the access times to prevent slow query operations or high latency round trips.

Caches are designed to quickly respond to simple requests that are comparable to the usage of a map or dictionary (key-value pairs). Therefore, they outperform typical general databases or other systems by an order of magnitude and answer in near real-time. In addition, most cache implementations offer read-through and write-through to those underlying data storages for transparent access.

Caching First is an architectural design pattern which reminds the architects to treat caching as a first-class citizen when designing new software architectures. However, a good caching layer is not as easy as it sounds, as lots of architectural and use case factors play into design decisions.

Geographical Caches, Partial Caches, Distributed Caches and all of the other types of common caching solutions fulfill different use cases and solve different problems. Selection of the right caching strategy is only the beginning, other things to consider include picking the best matching eviction algorithm (defining if and when elements are discarded, removed or updated) or which topology (local or remote caches) will be used.

Hazelcast’s new Caching Strategies whitepaper that I wrote provides a general overview of caching and its purpose, while offering deep insight into a number of caching strategies, their advantages and disadvantages, and when to apply them.

Cache (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Demystifying the Infrastructure as Code Landscape
  • Strategies for Kubernetes Cluster Administrators: Understanding Pod Scheduling
  • Reliability Is Slowing You Down
  • gRPC on the Client Side

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: