Check, if cache file exists instead of having config value
sergejostir opened this issue · 0 comments
Is there an interest to make themes cache work the same way as whole Laravel framework uses for its cache (config, routes, etc)?
Currently this package has a specific config option which controls the cache. The more reasonable way would be to simply check, if cache file exist (like Laravel does for its caches). That way there can't be any de-sync between actual cache state and the config value.
So when you enable cache the cache file is created (ON) and when you disable it, the file is deleted (OFF).
I can make a PR for this. It would be a fully backwards compatibile (themes.cache config value would have a preference over file check), but the config key wouldn't be specified by default anymore, so it can be removed on next major version release.
Considering that this package is made specifically for Laravel, it would make sense to follow common laravel "convention".