public static String taskIDfromCacheName(final String cacheName) {
        final String[] tokens = cacheName.split("-", 2);
        return tokens[0];
    }
Given a cache name of the form taskid-storename, return the task ID.
streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java