Upgrading rails. Better caching of graph