+ protected array $reflectionClasses = [];
+ protected array $controllerClasses = [];
+
+ /**
+ * Load the docs form the cache if existing
+ * otherwise generate and store in the cache.
+ */
+ public static function generateConsideringCache(): Collection
+ {
+ $appVersion = AppVersion::get();
+ $cacheKey = 'api-docs::' . $appVersion;
+ $isProduction = config('app.env') === 'production';
+ $cacheVal = $isProduction ? Cache::get($cacheKey) : null;
+
+ if (!is_null($cacheVal)) {
+ return $cacheVal;
+ }