1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-08-06 05:54:03 +00:00

Add comments for clarity

This commit is contained in:
lukinovec 2026-08-03 12:54:38 +02:00
parent 929ad14a6d
commit be1e8aa8d4

View file

@ -226,6 +226,8 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
}
foreach ($this->fileCacheStores() as $name) {
// Capture the paths only once. The config holds the central values on the first
// bootstrap, but not necessarily later (if an earlier bootstrap threw, revert() didn't run).
$this->originalCachePaths[$name] ??= [
'path' => $this->app['config']["cache.stores.{$name}.path"],
'lock_path' => $this->app['config']["cache.stores.{$name}.lock_path"],
@ -241,6 +243,8 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
foreach ($this->fileCacheStores() as $name) {
if (! isset($this->originalCachePaths[$name])) {
// Only scope stores captured during bootstrap. If one was added to tenancy.cache.stores
// mid-request, it has no original path here -- reading it would throw when tenancy ends.
continue;
}