Improved caching logic.
0.3.4