Build the prefixed key for a user-supplied path. No-op when keyPrefix is null.
String key(String path) => keyPrefix != null ? '$keyPrefix/$path' : path;