Caching Using Hazelcast In Spring Boot REST API

Table of Contents Introduction Prerequisites Project Setup MySQL Table Application Properties Entity Class Repository Interface Service Class REST Controller Spring Boot Main Class Testing Hazelcast Caching Java Config for Hazelcast Source Code Introduction In this tutorial I am going to show you an example on caching using hazelcast in Spring Boot REST APIs. The cache or caching mechanism is used…

Python Flask Cache in Web Applications

Introduction In this example, I am going to discuss about how to work with Python flask caching. Flask is a Python based light-weight web frameworks. Flask framework provides an extension called Flask-Caching that adds caching supports for various backends to any flask applications. You can also develop your own caching system by extending the flask_caching.backends.base.BaseCache class. Caching is used to…

Implementing Caching in Spring REST Services

Introduction Here I am going to show an example on implementing caching in Spring REST web services. Caching is used to store copies of frequently accessed data in several places for the request-response path. In other words, it stores a copy of a given resource and serves it back when requested. The performance of web sites and applications can be…

Spring JCache support

Introduction We will create an example on Spring JCache Support. Spring provides seamless JCache integration. In this example, I am using EhCache as a JCache specification provider. JCache is JSR 107 specification that provides annotations support such as @CacheResult, @CachePut, @CacheRemove and @CacheRemoveAll.

EhCache Implementation Using Spring Boot Framework

EhCache In this tutorial I am going to explain you how to use EhCache in application with Spring Boot framework. Caching mechanism improves application’s performance by loading the repeated data from the cache instead of fetching it from persistent storage, thus reducing the network round trips. The terms “buffer” and “cache” tend to be used interchangeably; note however they represent…

LRU Cache Implementation In Java

Introduction A cache is an amount of faster memory used to improve data access by storing portions of a data set the whole of which is slower to access. Sometimes the total data set are not actually stored at all; instead, each data item is calculated as necessary, in which case the cache stores results from the calculations. If your…

Precached images using JavaScript

Images often take several extra time to download from a Web server. If images change in response to user actions then you may want the same fast response that users are accustomed to. It may be an irritating situation while users are waiting for image(s) to be downloaded for a page and the page is loading slowly due to such…

Second Level OSCache example in Hibernate

This tutorial will sow how we can configure second level cache using OSCache in Hibernate step by step. We know that there are three types of caching mechanism in Hibernate such as First Level – Session, Second Level – SessionFactory and Query Level – SessionFactory. For more information on First Level, Second Level and Query Level please go through Hibernate…

Second level EHCache example in Hibernate 5

Introduction This tutorial will show second level ehcache example in Hibernate 5. EH stands for Easy Hibernate. We know that there are three types of caching mechanism such as First Level – session, Second Level – SessionFactory and Query Level – SessionFactory. Caching mechanism improves the performance of application because the data are loaded from cache instead of hitting the…

How to disable Browser Cache easily in CodeIgniter 3

Introduction In this tutorial I am going to show you how to disable browser cache easily in PHP based web framework Codeigniter. It is a good idea to cache static data on browser but it may be a problem when browsers cache dynamic data. For example, when browsers cache session data. Though generally you destroy session but still using browser’s…