Secure Communication and Content Caching for Internet of Vehicles