Added caching implementation