JCache Fundamentals

This course will teach you the fundamentals of how you can use caching in your applications with the JCache standard, including basic operations, efficiently using your caches, and listening to changes in your data.
Course info
Rating
(10)
Level
Intermediate
Updated
Sep 19, 2016
Duration
1h 23m
Table of contents
Description
Course info
Rating
(10)
Level
Intermediate
Updated
Sep 19, 2016
Duration
1h 23m
Description

At the core of a performant and scalable application is a thorough knowledge of how caching works. In this course, JCache Fundamentals, you will learn how to use caching within your application that meets the standard Java API. You will learn the building blocks of JCache, how to get data into and retrieve data from your caches efficiently, and finally, you'll learn how to receive events that indicate when your data changes. When you're finished with this course, you will have a foundational knowledge of the JCache API that will help you as you move forward to creating a performant and scalable solution that takes advantage of caching.

About the author
About the author

Grant is a Software Engineer with over 15 years experience working in mainly large scale, highly available and real time enterprise applications. He is keen on Agile approaches and automation to solve complex problems for clients and stakeholders.

More from the author
Practical Enterprise JMS Playbook
Intermediate
1h 39m
Dec 11, 2017
Getting Started with Hazelcast
Intermediate
1h 50m
Dec 16, 2015
Section Introduction Transcripts
Section Introduction Transcripts

Introduction
Hi, this is Grant Little from Pluralsight, and welcome to this course on JCache Fundamentals. The aim of this course is to give you enough background and examples to get you started on your journey using JCache. There's a fair bit to go over, so let's jump straight in and see what we'll be covering. We'll start with a very high level overview of what JCache is, why and how it came about, and where you might want to use it within your own application or system. Our first demo will be a typical Hello World application that will show you the basic building blocks of any application that uses JCache. Of course, we all know that Hello World applications don't usually map onto real-world scenarios, so we'll create a very simple application using Spring Boot that shows how JCache can be integrated into either new applications or existing ones. We'll cover some of the basic operations that are available to you considering various options to keep your data consistent. JCache can be backed up by a more permanent form of storage, so we'll go through read through caching and write through caching and how you can load your data from and save your data to an external data source, such as a database. While doing this, we'll consider resource utilization and how you can configure less frequently used data to expire to avoid resource starvation. Next, we'll go through what events you can receive from your data and how these can be used. We'll also cover how we can efficiently operate on data within our cache. There are some out-of-the-box annotations available that allow you to easily retrofit some of your existing applications or new ones with the caching capabilities, so we'll see how we can do that. And finally, we'll review how you can monitor and administrate your caches and cache data. There is lots to see, so let's get right into it.

Building Your First JCache Application
Hi, this is Grant Little from Pluralsight, and welcome back to this course on JCache Fundamentals. In this module, we'll be getting straight into some code. We'll look at the traditional Hello World application to demonstrate the very bare bones requirements for getting an application up and running using JCache. Once we've seen this, we'll break it down into some concepts and key API elements and go over these in more detail. The key features we'll look at are CachingProvider, the CacheManager, MutableConfiguration, and the Cache interface.

Working with JCache in the "Real World"
Hi, this is Grant Little from Pluralsight and welcome back to this course on JCache Fundamentals. In this module, we'll consider using JCache in a more real world scenario. For demonstration purposes, real world means a simple Spring Boot Application. We've already covered some of the basic cache operations such as get and set, but we'll look at few more. We'll also look at consistency and what that means in relation to JCache. And finally, we'll see how to reconfigure your application if you want to use a different JCache provider. There's lots to cover, so let's get into it.

Loading & Storing Data
Hi, this is Grant Little from Pluralsight, and welcome back to this course on JCache Fundamentals. In the last module, we saw on a number of occasions that when we restarted our application the data was lost and we had to reload it. In this module, we will look at how we can avoid doing this through the concept of read and write through caching. Specifically, we will look at the CacheWriters and CacheLoaders. We'll also have a look at the JCache expiry policy. This defines how long an entry in the cache is valid before it can be automatically removed by the JCache implementation.

Handling Events & Using Efficient Data Operations
Hi, this is Grant Little from Pluralsight, and welcome back to this course on JCache Fundamentals. In this module, we'll take a look at how you can be notified of specific events that happen within JCache and your data. Events we'll look at are when data is added to a cache, when data is updated within a cache, when data is removed from a cache, and also finally, when data is expired from a cache. We'll also look at EntryProcessors. These are a mechanism to atomically perform compound operations on data within the cache in a fast and efficient manner. So let's get straight into it.

Using JCache Annotations & Administering Your Caches
Hi, this is Grant Little from Pluralsight, and welcome back to this course on JCache Fundamentals. In this module, we'll briefly touch on the some of the annotations that are provided as part of the JCache API. Specifically these are CacheDefaults, CachePut, CacheResult, CacheRemove, and the CacheRemoveAll annotation. We'll also very briefly look at how you can see cache statistics and use JMX to administer your caches.