function addIndexEntries(key, req) {
        let groupName = req.apicacheGroup;

        if (groupName) {
            debug("group detected \"" + groupName + "\"");
            let group = (index.groups[groupName] = index.groups[groupName] || []);
            group.unshift(key);
        }

        index.all.unshift(key);
    }
Add key to index array
@param {string} key Key to add
@param {Object} req Express request object