Class BlockingCache

java.lang.Object
org.apache.ibatis.cache.decorators.BlockingCache
All Implemented Interfaces:
Cache

public class BlockingCache extends Object implements Cache

Simple blocking decorator

Simple and inefficient version of EhCache's BlockingCache decorator. It sets a lock over a cache key when the element is not found in cache. This way, other threads will wait until this element is filled instead of hitting the database.

By its nature, this implementation can cause deadlock when used incorrectly.

Author:
Eduardo Macarron