diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e91513..20241366 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * fix: Remove cache file & regenerate it if it is corrupt. * fix: `NullTransformer` bug. * fix(`CachingMappingFactory`): Cache result in memory. +* fix(`CachingMappingFactory`): Skip the cache if in debug mode. ## 0.5.8 diff --git a/src/Mapping/CachingMappingFactory.php b/src/Mapping/CachingMappingFactory.php index 6fb0a2ec..c7e02ea8 100644 --- a/src/Mapping/CachingMappingFactory.php +++ b/src/Mapping/CachingMappingFactory.php @@ -47,6 +47,10 @@ public function getMapping(): Mapping return $this->mapping; } + if ($this->kernel->isDebug()) { + return $this->mapping = $this->warmUpAndGetMapping(); + } + if (!file_exists($this->getCacheFilePath())) { return $this->mapping = $this->warmUpAndGetMapping(); }