added cache-service, used cache to store main page graph calc result to improve speed plus other refactorings.