protected void checkCacheVersion() {
        // Be very aggressive in invalidating the cache.
        boolean invalidate = true;
        QueryRunner run = new QueryRunner(ds);
        try {
            long latestVersion = run.query("SELECT version FROM gw_dataversion", Handlers.LONG_HANDLER); //$NON-NLS-1$
            if (latestVersion > -1 && dataVersion > -1 && latestVersion == dataVersion) {
                invalidate = false;
            } else {
                dataVersion = latestVersion;
            }
        } catch (SQLException e) {
            LOGGER.error("SQL problem encountered while running latest version query: " + e.getMessage(), e);
        }
        if (invalidate) {
            invalidateCache();
        }
    }
Checks the ES store to see if the 'dataVersion' entry has been updated with a newer
version #.  If it has, then we need to invalidate our cache.
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/PollCachingJdbcRegistry.java