Added basic caching to the endpoints.