You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cache.go
    path of file: ./repos/portainer/api/apikey
    
    the code of the file until where you have to start completion: package apikey

import (
	lru "github.com/hashicorp/golang-lru"
	portainer "github.com/portainer/portainer/api"
)

const defaultAPIKeyCacheSize = 1024

// entry is a tuple containing the use
    
func (c *apiKeyCache) InvalidateUserKeyCache(userId portainer.UserID) bool {
	present := false
	for _, k := range c.cache.Keys() {
		user, _, _ := c.Get(k.(string))
		if user.ID == userId {
			present = c.cache.Remove(k)
		}
	}
	return present
}