added configuration option to set cache lifetime