Skip to content

Conversation

@rohan2388
Copy link

Summary

Introduces a basic caching mechanism to prevent unnecessary regeneration of route/action files when nothing has changed.
This avoids deleting and rewriting hundreds of files (500+) on each run which can cause VS Code to lag or crash on Linux systems and significantly improves performance.

Changes

src/Route.php:

Added controllerAbsolutePath(), cacheKey(), and cacheValue() for unique cache keys and content hashes.

src/GenerateCommand.php:

Added $cached and $generatedFiles arrays to track file generation.
Writes two new cache files:
cache.json — stores route-level cache data.
generated_files.json — tracks all generated files.

@rohan2388 rohan2388 closed this Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant