Add caching to improve perfomance