Closed eliocamp closed 4 years ago
Ups, I realised I had a bug in my implementation. I'll update momentarily.
thanks a lot @eliocamp, here's the relevant part for API cache https://github.com/tradestatistics/plumber-api/blob/master/queries.R
Ok, now it should work.
Addressed #29 .
The cache logic is packaged in
with_cache
. In memory cache is handled by memoise and file cache is done in a csvy file. I had to use data.table::fread and data.table::fwrite because it ensures (for the most part) that the object returned from the file on disk is equal to the one in memory (attributes, column classes, etc).Let me know what you think.