documentation extended and the caching was moved to an external class