Stevebauman\Translation\Translation::setCacheTranslation PHP Method

setCacheTranslation() protected method

Sets a cache key to the specified locale and text.
protected setCacheTranslation ( Model $translation )
$translation Illuminate\Database\Eloquent\Model
    protected function setCacheTranslation(Model $translation)
    {
        if ($translation->parent instanceof Model) {
            $id = $this->getTranslationCacheId($translation->locale, $translation->parent->translation);
        } else {
            $id = $this->getTranslationCacheId($translation->locale, $translation->translation);
        }
        if (!$this->cache->has($id)) {
            $this->cache->put($id, $translation, $this->cacheTime);
        }
    }