fixed #1, including the lifetime problem and cache on by default if set to true