protected function cacheModelByCompoundKey(\Tx_Oelib_Model $model, array $data)
    {
        if (empty($this->compoundKeyParts)) {
            throw new \BadMethodCallException(
                'The compound key parts are not defined.',
                1363806895
            );
        }
        $values = [];
        foreach ($this->compoundKeyParts as $key) {
            if (isset($data[$key])) {
                $values[] = $data[$key];
            }
        }
        if (count($this->compoundKeyParts) === count($values)) {
            $value = implode('.', $values);
            if ($value !== '') {
                $this->cacheByCompoundKey[$value] = $model;
            }
        }
    }