Restrict cid
Permanently cache some settings

Fixes #734