Skip to content

Check, if cache file exists instead of having config value #124

@sergejostir

Description

@sergejostir

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions