@Deprecated
  public static GemFireCacheImpl getInstance() {
    InternalDistributedSystem system = getAnyInstance();
    if (system == null) {
      return null;
    }

    GemFireCacheImpl cache = (GemFireCacheImpl) system.getCache();
    if (cache == null) {
      return null;
    }

    if (cache.isClosing) {
      return null;
    }

    return cache;
  }
Returns the last created instance of GemFireCache.

@deprecated use DM.getCache instead
geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java