fix(magicModule): Implement cache for magicModule