How to check if cached chunk is properly cached

rmarkdown
knitr

#1

I’m trying to refactor a bunch of old automated reports and discovered recently that Rmarkdown/knitr allows to cache chunks depending if data file changed or not.

```{r data, fdep="myExcel.xlsx"}
knitr::opts_chunk$set(cache = TRUE, autodep = TRUE)
knitr::opts_chunk$set(cache.extra=tools::md5sum("myExcel.xlsx")) 

A bit early to say I’m completely confident about the options (all lines needed? just one?)

and one more question arised: “how can I be sure that the chunk is cached?”

Maybe printing start time and end time for first and last chunk?

any other (smarter of course) approach?