laravel-model-settings icon indicating copy to clipboard operation
laravel-model-settings copied to clipboard

Excessive Redis calls

Open fosron opened this issue 1 year ago • 1 comments

Hey,

I think this method should not call cache in any kind of production environment. I understand safe guarding while development is happening, but excessive connections to cache server (if it is Redis or any other) seems redundant.

https://github.com/glorand/laravel-model-settings/blob/master/src/Traits/HasSettingsField.php#L106

I would suggest either a master switch for this check, an environment config, or altogether removing this method.

fosron avatar Feb 27 '24 09:02 fosron

If you have time maybe you can prepare a pull request :)

glorand avatar Mar 13 '24 10:03 glorand