Move basic caching logic to separate module.
Add forgotton save parameters and fix typos.