Added cache support. Reworked settings controller