private synchronized void flushCaches() {
    try {
      TypeRegistry typeRegistry = ((InternalCache) CacheFactory.getAnyInstance()).getPdxRegistry();
      if (typeRegistry != null) {
        typeRegistry.flushCache();
      }
    } catch (CacheClosedException ignored) {
      // That's okay, it just means there was nothing to flush to begin with
    }
  }
Flush the type registry after possibly receiving new types or having old types replaced.
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/deployment/internal/legacy/LegacyJarDeploymentService.java