Clear Multiple Related Cache Entries

Sorry if this has been asked before, I did a quick search but came up empty. I have a complicated query I want to cache the results for. It is based on two parameters, one of which is nullable. The cache key would look something like this:

// $userId is nullable

$key = ‘promotion_’ . $promotionId . $userId

If an individual user id result changes, I can easily deal with that because it doesn’t affect anything else. But the result sets interrelate with each other in such a way that I need to invalidate ALL the “user” cache entries if the overall “promotionId” (with no user id) result changes. I can detect when that happens but I cannot find a way to invalidate the user cache entries. I thought maybe I could iterate through all cache keys, and invalidate all of them starting with ‘promotion_’ . $promotionId, but there is no function to do this that I can find (unless I missed it). How might I go about doing this? Thanks in advance.