Add test for cache settings
Fix checkstyle's violations