class CacheKey implements Key {

        private final String groupId;

        private final String artifactId;

        private final String version;

        private final WorkspaceRepository workspace;

        private final LocalRepository localRepo;

        private final List<RemoteRepository> repositories;

        private final int hashCode;

        CacheKey(Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session) {
            groupId = plugin.getGroupId();
            artifactId = plugin.getArtifactId();
            version = plugin.getVersion();

            workspace = RepositoryUtils.getWorkspace(session);
            localRepo = session.getLocalRepository();
            this.repositories = new ArrayList<>(repositories.size());
            for (RemoteRepository repository : repositories) {
                if (repository.isRepositoryManager()) {
                    this.repositories.addAll(repository.getMirroredRepositories());
                } else {
                    this.repositories.add(repository);
                }
            }

            int hash = 17;
            hash = hash * 31 + groupId.hashCode();
            hash = hash * 31 + artifactId.hashCode();
            hash = hash * 31 + version.hashCode();
            hash = hash * 31 + hash(workspace);
            hash = hash * 31 + localRepo.hashCode();
            hash = hash * 31 + RepositoryUtils.repositoriesHashCode(repositories);
            this.hashCode = hash;
        }

        @Override
        public int hashCode() {
            return hashCode;
        }

        @Override
        public boolean equals(Object obj) {<FILL_FUNCTION_BODY>}

        @Override
        public String toString() {
            return groupId + ':' + artifactId + ':' + version;
        }

        private static int hash(Object obj) {
            return obj != null ? obj.hashCode() : 0;
        }
    }

            if (this == obj) {
                return true;
            }

            if (!(obj instanceof CacheKey)) {
                return false;
            }

            CacheKey that = (CacheKey) obj;

            return Objects.equals(this.artifactId, that.artifactId)
                    && Objects.equals(this.groupId, that.groupId)
                    && Objects.equals(this.version, that.version)
                    && Objects.equals(this.localRepo, that.localRepo)
                    && Objects.equals(this.workspace, that.workspace)
                    && RepositoryUtils.repositoriesEquals(this.repositories, that.repositories);
        
<no_super_class>