This big was raised by @eribul in #192. It was reproducible exactly as described in the issue.
The cause is because there should always be a .hash file present in the cache drectory alongside the .RData file.
The solution is as follows: If the hash is missing, either because there was a previously cached variable made under an old version of ProjectTemplate, or it may have been inadvertently deleted, then the associated cache file is also removed when a cache command is issued again. This ensures a successful recache and a consistent cache directory again.
A test set has been added to check for this use case.
Note that there are a large number of man files re-generated when I rebuilt the package for this submission. These were not as a result of a change made by me under this PR. I suspect that an upgrade to ROxygen to v6.0 may have forced a recompile. Either way, the documentation is up to date now, so it's not a big deal.
This big was raised by @eribul in #192. It was reproducible exactly as described in the issue.
The cause is because there should always be a
.hash
file present in thecache
drectory alongside the.RData
file.The solution is as follows: If the hash is missing, either because there was a previously cached variable made under an old version of
ProjectTemplate
, or it may have been inadvertently deleted, then the associated cache file is also removed when acache
command is issued again. This ensures a successful recache and a consistentcache
directory again.A test set has been added to check for this use case.
Note that there are a large number of
man
files re-generated when I rebuilt the package for this submission. These were not as a result of a change made by me under this PR. I suspect that an upgrade to ROxygen to v6.0 may have forced a recompile. Either way, the documentation is up to date now, so it's not a big deal.