Added caching of resources