Hey,
Related to this issue: https://github.com/nWidart/laravel-modules/issues/495
Not a single command to flush any of the caches (redis flushall, artisan cache:clear, artisan view:clear, artisan clear-compiled), does actually flush the [module_name]_module.php in bootstrap/cache directory (laravel-modules/src/Laravel/Module.php:18).
When upgrading from laravel-modules v1.30 to v2.7 the cached service files are generated once and then never flushed. So after setting the property defer in a Module provided ServiceProvider to false, the change is ignored forever. (or until you manually remove bootstrap/cache/*.php).
It would be nice to remove module generated cache files with the art clear-compiled command.
Can you look into that?
Thanks in advanced.
Regards,
Levi
I'll close this as it seems to have been fixed with the related issue. 馃憤
Hey @nWidart ,
when I was wondering in which case the cached files from this package under 'bootstrap/cache/' will be flushed, I stumbled over this issue.
I checked the related bug and can see how the described problem there is fixed. But I don't see how this issue here is solved by that because there is, as far as I know, still no way to flush these files with any of the listed commands.
Do I miss something here? Thanks in advance and anyway for your great work on this project.
Hi, issue is still exists and solution is not clear. Is there a way to clear modulename_module.php files from bootstrap/cache folder from artisan command ?
atm we have 2 options
optimize:clear cmnd and clear the files using glob ex.Event::listen('Illuminate\Console\Events\CommandStarting', function ($event) { // or CommandFinished
if ($event->command == 'optimize:clear') {
File::delete(File::glob('bootstrap/cache/*_module.php'));
}
});
composer.post-autoload-dump
Most helpful comment
Hi, issue is still exists and solution is not clear. Is there a way to clear modulename_module.php files from bootstrap/cache folder from artisan command ?