blob: 93a997123e14c0edc697f3f22c7953f9ad0552c5 [file] [log] [blame]
<!--
▄▄▄ ██▓███ ▄▄▄ ▄████▄ ██░ ██ ▓█████ ██▓ ▄████ ███▄ █ ██▓▄▄▄█████▓▓█████
▒████▄ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ▓██░ ██▒▓█ ▀ ▓██▒ ██▒ ▀█▒ ██ ▀█ █ ▓██▒▓ ██▒ ▓▒▓█ ▀
▒██ ▀█▄ ▓██░ ██▓▒▒██ ▀█▄ ▒▓█ ▄ ▒██▀▀██░▒███ ▒██▒▒██░▄▄▄░▓██ ▀█ ██▒▒██▒▒ ▓██░ ▒░▒███
░██▄▄▄▄██ ▒██▄█▓▒ ▒░██▄▄▄▄██ ▒▓▓▄ ▄██▒░▓█ ░██ ▒▓█ ▄ ░██░░▓█ ██▓▓██▒ ▐▌██▒░██░░ ▓██▓ ░ ▒▓█ ▄
▓█ ▓██▒▒██▒ ░ ░ ▓█ ▓██▒▒ ▓███▀ ░░▓█▒░██▓░▒████▒ ░██░░▒▓███▀▒▒██░ ▓██░░██░ ▒██▒ ░ ░▒████▒
▒▒ ▓▒█░▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░ ▒ ░░▒░▒░░ ▒░ ░ ░▓ ░▒ ▒ ░ ▒░ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░
▒ ▒▒ ░░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ░▒░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░ ░ ░ ░ ░
░ ▒ ░░ ░ ▒ ░ ░ ░░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apache Ignite - Use Cases</title>
<link media="all" rel="stylesheet" href="/css/all.css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet">
<link media="all" rel="stylesheet" href="/css/syntaxhighlighter.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!--#include virtual="/includes/sh.html" -->
</head>
<body>
<div id="wrapper">
<!--#include virtual="/includes/header.html" -->
<main id="main" role="main" class="container">
<section id="hibernate-l2-cache" class="page-section">
<div class="col-sm-12 col-md-12 col-xs-12" style="padding:0 0 20px 0;">
<div class="col-sm-6 col-md-7 col-xs-12" style="padding-left:0;">
<h2 class="first">Ignite as Hibernate L2 Cache</h2>
<p>
Hibernate stores data in first-level (L1) cache to minimize expensive database requests. However,
this data is cached per Hibernate session and is not shared among threads. A common solution here is
to configure a second-level (L2) cache.
</p>
<p>
Ignite In-Memory Data Grid can be plugged in as Hibernate second-level (L2) cache.
Accessible by all sessions, Ignite Data Grid can significantly accelerate the performance of your
application by reducing the data access time.
</p>
<div class="page-heading">How Hibernate Caching Works</div>
<p>
Hibernate first-level (L1) cache is associated with the session object, the scope of which
is limited to a single session. Objects cached in one session are not shared with another,
which means that a request for the same entity by another session
will still go to the database.
</p>
</div>
<div class="col-sm-6 col-md-5 col-xs-12" style="padding-right:0">
<img class="first img-responsive" src="/images/hibernate-L2-cache.png" width="400px" style="float:right;"/>
</div>
</div>
<div class="page-heading">Ignite as Hibernate L2 Cache</div>
<p>
To overcome the issue of per-session cache, a global second-level (L2) cache can be configured,
in which cached objects are visible to all sessions. This usually gives a significantly greater
performance gain since each newly created session now has access to the data already present in
the L2 cache memory.
</p>
<p>
Apache Ignite can be plugged-in as Hibernate L2 cache implementation, and can be used in all access
modes - <code>READ_ONLY</code>, <code>READ_WRITE</code>, <code>NONSTRICT_READ_WRITE</code>, and
<code>TRANSACTIONAL</code>, supporting a wide range of related features:
<ul class="page-list">
<li>On-Heap and Off-Heap in-memory stores, as well as disk overflow.</li>
<li>Cache transactions, that make <code>TRANSACTIONAL</code> mode possible.</li>
<li>Clustering, with 2 different replication modes: <code>REPLICATED</code> and <code>PARTITIONED</code></li>
</ul>
</p>
<p>
<a href="http://apacheignite.readme.io/docs/hibernate-l2-cache">
<b>Configure Hibernate L2 Cache <i class="fa fa-angle-double-right"></i></b>
</a>
</p>
</section>
</main>
<!--#include virtual="/includes/footer.html" -->
</div>
<!--#include virtual="/includes/scripts.html" -->
</body>
</html>