Skip to content

It is a prof of concept to see how second level cache works in JPA

Notifications You must be signed in to change notification settings

knishe/fast-food-recipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

fast-food-recipe

It is a webservice that fetches recipes and keeps the frequent accessed recipe within a cache

How to run

mvn spring-boot:run

What it does?

The following is the sample webservice to get the recipe as a JSON

Example:

localhost:8080/recipe?id=101

The following log results shows when the recipe loaded to the cache.

2017-04-06 22:07:16.688  INFO 8574 --- [nio-8080-exec-1] com.mycompany.recipe.RecipeService       : Recipe 101 not found in cache. TimeStamp: Thu Apr 06 22:07:16 IST 2017
2017-04-06 22:07:16.702  INFO 8574 --- [hcache [null]-0] com.mycompany.recipe.CacheEventLogger    : Event: CREATED Key: 101 old value: null new value: Recipe{id=101, description='Chicken'}

About

It is a prof of concept to see how second level cache works in JPA

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages