Added API tracing and integrated new caching