Added caching function in the server.