Add caching on traces API