Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 659431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:02:37+00:00 2026-05-13T23:02:37+00:00

Currently, in order to check if the Hibernate 2nd-level cache was used for a

  • 0

Currently, in order to check if the Hibernate 2nd-level cache was used for a Database query, I check my SQL log (through p6spy or logSql=true in Datasource.groovy) to see if the Grais/Hibernate triggered an SQL query. And I assume that if the query was not logged, it might mean that cache was used.

It is pretty complicated for a simple information, isn’t it?

So do you know a simple way to get and log the information : “Cache was used vs. DB query was triggered” ?

EDIT: Following Pascal recommendations, I have added this trace 'org.hibernate.cache' to my log4j configuration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:02:38+00:00Added an answer on May 13, 2026 at 11:02 pm

    You could activate the org.hibernate.cache category to log all second-level cache activity. To do so (according to the Grails FAQ), edit your Config.groovy file. Find the line with:

    hibernate = "off"
    

    and replace it with:

    hibernate.cache = "trace,stdout"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are implementing edi order processing and are currently about to check how we
Executing SP to check who is currently logon in the SQL working fine in
I'm currently developing an order entry application for my company. This means I need
Currently, in order to evaluate elist in Emacs, I need to position the cursor
Currently in development and testing phase, in order to distribute my app amoung test
I am currently using Serialization in order to make deep copies of some autogenerated
I'm currently using CoreLocation + CLLocationManager in order to compare a users current location
I am currently using CreateView for the class Order . Part of the urls.py
I'm currently searching for a possibility to order a mysql result by weights that
I'm currently trying to create a subclass of UIImageView in order to make it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.