{"id":54440,"date":"2016-04-06T13:00:37","date_gmt":"2016-04-06T10:00:37","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=54440"},"modified":"2016-04-05T12:09:29","modified_gmt":"2016-04-05T09:09:29","slug":"enabling-entity-query-cache-hibernate","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html","title":{"rendered":"Enabling Entity and Query cache in Hibernate"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked every time\u00a0for a particular entity and the table data is not liable to change for a particular time slot, we can possibly cache\u00a0the query results with Hibernate. This means that, if we want the details of a Student with id 1234, the query executes and hits the database only for the first request. The subsequent requests are served with the results from the query cache. This\u00a0brings a high impact in the response time which we could notice.\u00a0When we do this, we are also concerned about when the\u00a0cache refreshes itself. We can do that easily with a simple configuration, which we will be exploring.<\/p>\n<blockquote>\n<p>If a query cache is applied, then no subsequent SQL statement is sent to the database. The query results are retrieved from the query cache, and then the cached entity identifiers are used to access the second level cache.<\/p>\n<\/blockquote>\n<h2>2. Implementation<\/h2>\n<p>To enable query cache, below are the set of steps that needs to be followed \u2013<\/p>\n<ol>\n<li>Set the <strong>hibernate.cache.use_query_cache<\/strong> property to <strong>true <\/strong>and make sure the <strong>second level cache<\/strong> is enabled. <a href=\"http:\/\/www.jcombat.com\/hibernate\/ehcache-as-second-level-cache-implementation\" target=\"_blank\">Follow this link<\/a>\u00a0to understand the second level cache.\n<pre class=\"brush:xml;wrap-lines:false\">&lt;bean id=\"sessionFactory\"\r\n\tclass=\"org.springframework.orm.hibernate4.LocalSessionFactoryBean\"&gt;\r\n\t&lt;property name=\"dataSource\" ref=\"dataSource\" \/&gt;\r\n\t&lt;property name=\"hibernateProperties\"&gt;\r\n\t\t&lt;props&gt;\r\n\t\t\t&lt;prop key=\"hibernate.dialect\"&gt;org.hibernate.dialect.MySQLDialect&lt;\/prop&gt;\r\n\t\t\t&lt;prop key=\"hibernate.show_sql\"&gt;true&lt;\/prop&gt;\r\n\t\t\t&lt;!-- Enable second level cache --&gt;\r\n\t\t\t&lt;prop key=\"hibernate.cache.use_second_level_cache\"&gt;true&lt;\/prop&gt;\r\n\t\t\t&lt;prop key=\"hibernate.cache.use_query_cache\"&gt;true&lt;\/prop&gt;\r\n\t\t\t&lt;prop key=\"hibernate.cache.region.factory_class\"&gt;org.hibernate.cache.ehcache.EhCacheRegionFactory&lt;\/prop&gt;\r\n\t\t\t&lt;prop key=\"net.sf.ehcache.configurationResourceName\"&gt;\/ehCache.xml&lt;\/prop&gt;\r\n\t\t&lt;\/props&gt;\r\n\t&lt;\/property&gt;\r\n\t&lt;property name=\"mappingResources\"&gt;\r\n\t\t&lt;list&gt;\r\n\t\t\t&lt;value&gt;User.hbm.xml&lt;\/value&gt;\r\n\t\t&lt;\/list&gt;\r\n\t&lt;\/property&gt;\r\n&lt;\/bean&gt;\r\n<\/pre>\n<\/li>\n<li>With that done, <strong>org.hibernate.cache.internal.StandardQueryCache\u00a0<\/strong>holds the cached query results.<\/li>\n<li>In the ehCache configuration file, add the below snippet \u2013\n<pre class=\"brush:xml\">&lt;cache name=\"org.hibernate.cache.StandardQueryCache\" \r\n\tmaxElementsInMemory=\"10000\" \r\n\teternal=\"false\" \r\n\ttimeToLiveSeconds=\"86400\" \r\n\toverflowToDisk=\"false\" \r\n\tmemoryStoreEvictionPolicy=\"LRU\" \/&gt;\r\n<\/pre>\n<\/li>\n<li><em>The\u00a0query cache does not cache the state of the actual entities in the cache. It caches identifier values and results of value type. Therefore, <strong>always use the query cache in conjunction with the second-level cache for those entities<\/strong> which should be cached as part of a query result cache<\/em> \u2013\u00a0<a href=\"https:\/\/docs.jboss.org\/hibernate\/orm\/4.0\/devguide\/en-US\/html\/ch06.html\" target=\"_blank\">https:\/\/docs.jboss.org\/hibernate\/orm\/4.0\/devguide\/en-US\/html\/ch06.html<\/a><\/li>\n<li>To cache the concerned\u00a0entity as\u00a0specified in point 4, we need to add the following snippet into the XML entity mapping file as \u2013\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;!DOCTYPE hibernate-mapping PUBLIC \r\n \"-\/\/Hibernate\/Hibernate Mapping DTD\/\/EN\"\r\n \"http:\/\/www.hibernate.org\/dtd\/hibernate-mapping-3.0.dtd\"&gt; \r\n \r\n&lt;hibernate-mapping&gt;\r\n   &lt;class name=\"Employee\" table=\"EMPLOYEE\"&gt;\r\n      &lt;cache usage=\"transactional\" include=\"non-lazy\" \/&gt;\r\n      &lt;id name=\"id\" type=\"int\" column=\"ID\"&gt;\r\n         &lt;generator class=\"native\"\/&gt;\r\n      &lt;\/id&gt;\r\n      &lt;property name=\"firstName\" column=\"FNAME\" type=\"string\"\/&gt;\r\n      &lt;property name=\"lastName\" column=\"LNAME\" type=\"string\"\/&gt;\r\n   &lt;\/class&gt;\r\n&lt;\/hibernate-mapping&gt;\r\n<\/pre>\n<p>The above makes sure that the <strong>non-lazy components<\/strong> of the entity are cached as part of a query result cache.<\/li>\n<li>With all the above points covered, the final point is to explicitly enable the query caching to the individual queries as \u2013\n<pre class=\"brush:java\">Query query = session.createQuery(\"FROM EMPLOYEE\");\r\nquery.setCacheable(true);\r\nList users = query.list();\r\n<\/pre>\n<\/li>\n<\/ol>\n<p>With all this done, maybe you can start your server in debug mode and see the magic happen!<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.jcombat.com\/hibernate\/enabling-entity-and-query-cache-in-hibernate\">Enabling Entity and Query cache in Hibernate<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a> Abhimanyu Prasad at the <a href=\"http:\/\/www.jcombat.com\">jCombat<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked every time\u00a0for a particular entity and the table data is not liable to change for a particular time slot, we can possibly cache\u00a0the query results with Hibernate. This means that, &hellip;<\/p>\n","protected":false},"author":958,"featured_media":153,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[31],"class_list":["post-54440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-jboss-hibernate"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Enabling Entity and Query cache in Hibernate - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabling Entity and Query cache in Hibernate - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/abhi435\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-06T10:00:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Abhimanyu Prasad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhimanyu Prasad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html\"},\"author\":{\"name\":\"Abhimanyu Prasad\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/8084cf3db3cc9b2c21fc2c04307d47c7\"},\"headline\":\"Enabling Entity and Query cache in Hibernate\",\"datePublished\":\"2016-04-06T10:00:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html\"},\"wordCount\":406,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jboss-hibernate-logo.jpg\",\"keywords\":[\"JBoss Hibernate\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html\",\"name\":\"Enabling Entity and Query cache in Hibernate - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jboss-hibernate-logo.jpg\",\"datePublished\":\"2016-04-06T10:00:37+00:00\",\"description\":\"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jboss-hibernate-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jboss-hibernate-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/enabling-entity-query-cache-hibernate.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Enabling Entity and Query cache in Hibernate\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/8084cf3db3cc9b2c21fc2c04307d47c7\",\"name\":\"Abhimanyu Prasad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g\",\"caption\":\"Abhimanyu Prasad\"},\"description\":\"Abhimanyu is a passionate tech blogger and senior programmer, who has an extensive end-to-end development experience with wide range of technologies. He is the founder and administrator at jCombat.\",\"sameAs\":[\"http:\\\/\\\/www.jcombat.com\",\"https:\\\/\\\/www.facebook.com\\\/abhi435\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/abhimanyu-prasad\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enabling Entity and Query cache in Hibernate - Java Code Geeks","description":"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html","og_locale":"en_US","og_type":"article","og_title":"Enabling Entity and Query cache in Hibernate - Java Code Geeks","og_description":"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked","og_url":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/abhi435","article_published_time":"2016-04-06T10:00:37+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg","type":"image\/jpeg"}],"author":"Abhimanyu Prasad","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Abhimanyu Prasad","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html"},"author":{"name":"Abhimanyu Prasad","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/8084cf3db3cc9b2c21fc2c04307d47c7"},"headline":"Enabling Entity and Query cache in Hibernate","datePublished":"2016-04-06T10:00:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html"},"wordCount":406,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg","keywords":["JBoss Hibernate"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html","url":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html","name":"Enabling Entity and Query cache in Hibernate - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg","datePublished":"2016-04-06T10:00:37+00:00","description":"1. Introduction Amongst the performance related tasks\u00a0I have been through, this has been\u00a0one of them. The concern is that if the same query is invoked","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jboss-hibernate-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/enabling-entity-query-cache-hibernate.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Enabling Entity and Query cache in Hibernate"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/8084cf3db3cc9b2c21fc2c04307d47c7","name":"Abhimanyu Prasad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8197b6658b8d42a7c85117f4aabe67206651698dbc306809655610f6af906610?s=96&d=mm&r=g","caption":"Abhimanyu Prasad"},"description":"Abhimanyu is a passionate tech blogger and senior programmer, who has an extensive end-to-end development experience with wide range of technologies. He is the founder and administrator at jCombat.","sameAs":["http:\/\/www.jcombat.com","https:\/\/www.facebook.com\/abhi435"],"url":"https:\/\/www.javacodegeeks.com\/author\/abhimanyu-prasad"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/54440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/958"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=54440"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/54440\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/153"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=54440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=54440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=54440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}