moved cache init to separate source file