Implemented caching for settings model.