Tagged articles
first-level cache
10 articles · Page 1 of 1
This article explains why MyBatis second-level cache returns stale data, detailing first and second-level cache mechanics, cache key composition, write timing, namespace isolation issues, statement-level cache controls, Redis implementation, and conditions for safe cache usage.
CacheKeyMyBatisRedis cache
0 likes · 30 min read

This guide walks through a full MyBatis unit‑testing suite built on Spring Boot 3.x and JDK 17+, showing how to configure Maven dependencies, set up an H2 datasource, write POJOs, define mapper interfaces and XML, and verify features such as mapper proxies, parameter binding, dynamic SQL, resultMap mapping, camel‑case conversion and first‑level caching with JUnit 5.
Dynamic SQLJUnit 5MyBatis
0 likes · 25 min read

This guide explains MyBatis's two‑level caching mechanism, shows how to use the default first‑level cache and manually enable the second‑level cache in a Spring Boot project, includes code examples, test cases, third‑party Ehcache integration, and key considerations for safe deployment.
CacheEhcacheMyBatis
0 likes · 8 min read

This article explains how MyBatis first‑level (session) and second‑level (cross‑session) caches work, the conditions required for them to function, common pitfalls when integrating with SpringBoot, and step‑by‑step instructions to enable and safely use second‑level caching in real projects.
CacheJavaMyBatis
0 likes · 11 min read

The article explains MyBatis first‑level and second‑level caching mechanisms, their activation conditions, integration pitfalls with Spring Boot, and how to enable and use them safely, including configuration steps, code examples, and warnings about hidden risks of second‑level cache.
JavaMyBatisSpring Boot
0 likes · 12 min read

This article explains the principles, implementation steps, and configuration of MyBatis first‑level (SqlSession) and second‑level (mapper) caches, compares their scopes and behaviors, and provides practical guidance on when and how to enable each cache to improve database query performance.
BackendCacheJava
0 likes · 7 min read

This guide explains what caching is, why it’s essential for database‑driven applications, and how MyBatis implements first‑level and second‑level caches, including configuration steps, sample code, execution results, and key considerations to ensure effective cache usage.
BackendCacheJava
0 likes · 10 min read

This article explains the principles and practical usage of MyBatis first‑level and second‑level caches, describing how caching reduces database load, showing configuration steps, code demonstrations, flow diagrams, and important considerations such as cache invalidation and LRU eviction.
CacheJavaMyBatis
0 likes · 10 min read

This article explains the concepts of MyBatis first-level and second-level caches, demonstrates how they work with practical Java code, shows configuration methods, and highlights important considerations such as cache invalidation and eviction policies.
CacheJavaMyBatis
0 likes · 8 min read

This article explains the purpose, differences, default settings, and practical verification of MyBatis first‑level and second‑level caches in Spring Boot, showing how cache scope, transaction boundaries, and mapper configuration affect cache behavior and performance.
@TransactionalCacheMyBatis
0 likes · 10 min read
