Mybatis source code parsing - Cache

Cache

Decorator

Mybatis decorative use cache mode, decorated with the decoration classes implement the same interfaces, and is held decorative instance.
Such as 具体装饰器2—持有—>具体装饰器1—持有—>基本实现类to achieve a step by step Enhanced
IO bag Jdk uses a lot of decorative mode, such as BufferedInputstream etc.

cache core implementation class

PerpetualCache basic implementation class, using the underlying HashMap cache; the rest are implemented decorative class

  1. BlockingCache
  2. FifoCache, LRUCache
  3. SoftCache, WeakCache
  4. ScheduledCache
  5. LoggingCache
  6. SynchronizedCache
  7. CacheSerializedCache

Most of its implementation is intended to see to know the name, but to explain

Published 98 original articles · won praise 9 · views 10000 +

Guess you like

Origin blog.csdn.net/Mutou_ren/article/details/103036606