set cache lifetime