protected function calculateKey() { $factors = [__CLASS__, $this->getId()]; if (is_array($this->variations)) { foreach ($this->variations as $factor) { $factors[] = $factor; } } return $factors; }