Added caching to contract model