@Override
  protected void createOrRetrieveCache() {
    if (getLogger().isDebugEnabled()) {
      getLogger().debug(this + ": Creating cache");
    }
    // Get the existing cache if any
    try {
      cache = ClientCacheFactory.getAnyInstance();
    } catch (CacheClosedException ignored) {
    }

    // If no cache exists, create one
    String message;
    if (cache == null || cache.isClosed()) {
      // enable pool subscription so that default cache can be used by hibernate module
      cache = new ClientCacheFactory(createDistributedSystemProperties()).create();
      message = "Created ";
    } else {
      message = "Retrieved ";
    }
    getLogger().info(message + cache);
  }
This is a singleton class which maintains configuration properties as well as starting a
Client-Server cache.
extensions/geode-modules/src/main/java/org/apache/geode/modules/session/bootstrap/ClientServerCache.java