-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clear cache does not clear /storage/views #2630
Comments
I am taking up this issue, i discussed it with @askvortsov1 in #internal chat. Below are the solutions we discussed for now. There's 2 things that need to be done: in https://github.com/flarum/core/blob/ea291508ab954a04682927ebe3bfafbfb584e752/src/Extend/View.php#L16-L16, when extensions that add/remove views are enabled/disabled, the view cache should probably be cleared too |
To clarify this one, it needs to implement LifecycleInterface, which will automatically run the relevant methods on enable/disable. The Formatting extender is a good example of this. |
@askvortsov1 - By using LifecycleInterface i can use onEnable and onDisable, However if i want to use Repository (Illuminate\Contracts\Cache\Repository) forget method inside Extend/View.php, could you please guide me how can i do that in https://github.com/flarum/core/blob/ea291508ab954a04682927ebe3bfafbfb584e752/src/Extend/View.php#L16-L16 |
Although using repository would be a nice abstraction, we don't currently do so for views; that's hardcoded to use the same filesystem that Flarum is installed on (revamping that would be nice, that's part of the stuff I mentioned above for potential long term improveents, but probably quite complicated). So for now, I'd say that part of cache should be cleared in the same way that it'll need to be implemented in
The storage path can be gotten via |
Bug Report / Feature Request
Current Behavior
php flarum cache:clear does not clear old blade templates under storage/views
Steps to Reproduce
Expected Behavior
These files should be cached and cleared when executing php flarum cache:clear
The text was updated successfully, but these errors were encountered: