Add cache support, move generate to resource folder to pass codesign