diff --git a/config.php b/config.php index 95b6dbd..7e45224 100644 --- a/config.php +++ b/config.php @@ -91,4 +91,15 @@ */ 'should_discover_events' => null, + + /* + |-------------------------------------------------------------------------- + | Custom cache filename + |-------------------------------------------------------------------------- + | + | This is the filename of the cache file that will be used to store the modules configuration. + | + */ + + 'cache_filename' => 'modules.php', ]; diff --git a/src/Support/ModularServiceProvider.php b/src/Support/ModularServiceProvider.php index 22120ca..d2c26e4 100644 --- a/src/Support/ModularServiceProvider.php +++ b/src/Support/ModularServiceProvider.php @@ -50,7 +50,7 @@ public function register(): void $this->app->singleton(ModuleRegistry::class, function() { return new ModuleRegistry( $this->getModulesBasePath(), - $this->app->bootstrapPath('cache/modules.php') + $this->app->bootstrapPath('cache/' . config('app-modules.cache_filename', 'modules.php')) ); });