public static String initCacheDir(String namespace, NacosClientProperties properties) {
        
        String jmSnapshotPath = properties.getProperty(JM_SNAPSHOT_PATH_PROPERTY);
        
        String namingCacheRegistryDir = "";
        if (properties.getProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR) != null) {
            namingCacheRegistryDir =
                    File.separator + properties.getProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR);
        }
        
        if (!StringUtils.isBlank(jmSnapshotPath)) {
            cacheDir = jmSnapshotPath + File.separator + FILE_PATH_NACOS + namingCacheRegistryDir + File.separator
                    + FILE_PATH_NAMING + File.separator + namespace;
        } else {
            cacheDir =
                    properties.getProperty(USER_HOME_PROPERTY) + File.separator + FILE_PATH_NACOS + namingCacheRegistryDir
                            + File.separator + FILE_PATH_NAMING + File.separator + namespace;
        }
        
        return cacheDir;
    }
@Test
    void testInitCacheDirWithJmSnapshotPathRootAndWithoutCache() {
        System.setProperty("JM.SNAPSHOT.PATH", "/home/snapshot");
        String actual = CacheDirUtil.initCacheDir("test", NacosClientProperties.PROTOTYPE.derive());
        assertEquals("/home/snapshot/nacos/naming/test", actual);
    }