-
-
Notifications
You must be signed in to change notification settings - Fork 725
Description
Question
Hi, I've seen some mentions about cache in the source code, namely Option::CACHE_DIR
and ChangedFilesDetector
. I'd like to know what's the purpose of this cache? When does it get hit?
I'm asking because what I'd like to do is to have fast downgrade run when there are very little changes in the code. Because Rector mostly does the same thing over and over again.
So I'd like to have a cache where there's a structure like "path to file" => {original contents, downgraded contents}
. When Rector runs, and sees that the file still has the original content, it doesn't have to execute all the expensive and slow logic, it can just replace the contents of the file with downgraded contents from the cache.
I can build it myself, I'd just like to know if there's something like that already in Rector, and how to use it.
Thanks.