RainLab\Translate\Models\Locale::clearCache PHP Method

clearCache() public static method

Clears all cache keys used by this model
public static clearCache ( ) : void
return void
    public static function clearCache()
    {
        Cache::forget('rainlab.translate.locales');
        Cache::forget('rainlab.translate.defaultLocale');
    }

Usage Example

示例#1
0
 public function onDelete()
 {
     LocaleModel::clearCache();
     $this->asExtension('FormController')->update_onDelete(post('record_id'));
     return $this->listRefresh();
 }