Add cache_key_for_tasks helper method