pgfSweave
pgfSweave copied to clipboard
Clean up old cache directories
I think I can understand the situation now. The only thing that makes me uncomfortable is the creation of new cache directories without removing the old ones, thus each time I change a code chunk, I get a new directory created.
This is not a really big issue, though. I can live with it.
I agree, that is somewhat unfortunate, but I think the benefits outweigh the negatives. It still respects the cache dir so you wont have directories cluttering up the main folder. Maybe I should set a default for the cache dir to not be .
, perhaps pgfSweaveCache
?
or maybe remove the dir's with the same prefix and only keep the most recent one? (do this in the function pgfSweave()
)
That is actually a good suggestion, the only reason to keep the extras around is if the code is changed back to an exact older state, which I think is quite unlikely.
This could be done in pgfSweave
after the code has been run but I wonder if it might not be easier to do it in the driver. At that level we would have the names of the code chunks and their checksums to do an easy clobber of all the old cache directories.
I'm changing the name of the issue if you dont mind. from
external=TRUE --> cache=TRUE
to
Clean up old cache directories
I don't mind at all. I just jumped from the email to github and did not consider a meaningful title.