private Region<String, HttpSession> createOrRetrieveLocalRegion() {
    // Attempt to retrieve the fronting region
    String frontingRegionName = sessionRegion.getName() + "_local";
    Region<String, HttpSession> frontingRegion = cache.getRegion(frontingRegionName);

    if (frontingRegion == null) {
      // Create the region factory
      RegionFactory<String, HttpSession> factory =
          cache.createRegionFactory(RegionShortcut.LOCAL_HEAP_LRU);

      // Add the cache loader and writer
      factory.setCacheLoader(new LocalSessionCacheLoader(sessionRegion));
      factory.setCacheWriter(new LocalSessionCacheWriter(sessionRegion));

      // Create the region
      frontingRegion = factory.create(frontingRegionName);
      LOG.info("Created new local session region: {}", frontingRegion);
    } else {
      LOG.info("Retrieved existing local session region: {}", frontingRegion);
    }

    return frontingRegion;
  }
Create a local region fronting the main region.
extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/PeerToPeerSessionCache.java