Custom view caching. Added tests.