Added ip address caching too

Added ip address caching too