nova-settings icon indicating copy to clipboard operation
nova-settings copied to clipboard

Settings cache is not invalidated when settings are updated or deleted

Open k8n opened this issue 1 year ago • 0 comments

Could we add something like the following in the default Eloquent model event handlers, please?

            $cacheKey = 'settings.' . $model->slug . '.' . $model->env;
            $configKey = 'nova-settings.storage.' . $model->slug . '.' . $model->env;
            Config::set($configKey, null);
            Cache::forget($cacheKey);

https://github.com/stepanenko3/nova-settings/blob/1b048348b71ee388cf22ef814a243a3b21488cad/src/Events/SettingsUpdated.php#L17

https://github.com/stepanenko3/nova-settings/blob/1b048348b71ee388cf22ef814a243a3b21488cad/src/Events/SettingsDeleted.php#L17

k8n avatar Oct 13 '24 16:10 k8n