Refactor code

Remove Setting::deleteSetting()
Add Setting::clearCache()
Add testcase