Right now I’m caching generated documents on the filesystem and calculate a hash to detect a change in the data used for generation. The generation is done in an action controller. Is there an option to use the internal caching system to store my cached documents there? Otherwise my solution is working.
Currently I primarily generate PDF files, but also some Word templates (dotx) and Excel files. With very few exceptions, the files are up to 500 kilobytes in size. I am currently calculating whether the data is still up to date. If so, I read it from the file system - otherwise I generate the files, store them on the file system, delete the outdated file and deliver it.