GithubHelp home page GithubHelp logo

spring-boot-jpa-two-level-cache's Introduction

Spring-boot-JPA-Two-Level-Cache

Ref:

Check the first request trace:

First Request

curl -k 'http://localhost:8080/article/1'

Duration:213.689ms Services:2 Depth:2 Total Spans:15

Flow:

Key Value
http.method GET
http.path /article/1
mvc.controller.class ArticleCommentController
mvc.controller.method getArticle
sql.query select 1
sql.query set session transaction read only
sql.query SET autocommit=0
sql.query select article0_.id as id1_0_0_, article0_.article_text as article_2_0_0_ from article article0_ where article0_.id=1
sql.query commit
sql.query SET autocommit=1
sql.query set session transaction read write
sql.query set session transaction read only
sql.query SET autocommit=0
sql.query commit
sql.query SET autocommit=1
sql.query set session transaction read write
sql.query select comments0_.article_id as article_4_2_0_, comments0_.id as id1_2_0_, comments0_.id as id1_2_1_, comments0_.article_id as article_4_2_1_, comments0_.created_at as created_2_2_1_, comments0_.comment_str as comment_3_2_1_, comments0_.user_id as user_id5_2_1_ from comment comments0_ where comments0_.article_id=1
sql.query select user0_.id as id1_6_0_, user0_.date_of_birth as date_of_2_6_0_, user0_.full_name as full_nam3_6_0_ from user user0_ where user0_.id=1

image1

Second Request

curl -k 'http://localhost:8080/article/1'

Duration: 19.206ms Services:2 Depth:2 Total Spans:7
Approx 10 times improvement in response time

Flow:

Key Value
http.method GET
http.path /article/1
mvc.controller.class ArticleCommentController
mvc.controller.method getArticle
sql.query select 1
sql.query set session transaction read only
sql.query SET autocommit=0
sql.query commit
sql.query SET autocommit=1
sql.query set session transaction read write

image2

spring-boot-jpa-two-level-cache's People

Contributors

dineshbhagat avatar

Watchers

 avatar

Forkers

octaviancahyadi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.