Yes and no. The issue is that Varnish is doing what it’s supposed to do ?? Caching static files! We want it to cache pdfs, and the URL format of “file=” is way too broad and would cause us to break cache for everyone which would not be a great idea. Instead of causing a problem for one user, we cause a problem for ALL users. Similarly, allowing file_uploads (which is where it stores the files) would cause serious slowdowns for others.
So I have to present you with some options!
Options one – Open a ticket with DreamHost and ask us to make you a Custom VCL rule to allow those specific URLs to skip caching. If you do this, please remember to give us the FULL URL of one of the files ?? That helps us craft a specific rule for you. It may take us a little while to perfect it, but we certainly can do that.
Option two – Ask the plugin dev to do a couple things:
First – Put in a &nocache option in the plugin to bust cache. This will allow for more than just DreamPress to handle the files, as that’s a standard call ?? It would obviate issues with most caching systems.
b) Use pretty URLs instead of file=folder/filename
to access the files. This will allow us (and everyone else) to customize rules a lot more easily.
Option three – Ask the dev to make a custom filter so you can add on variables to the URLs. This is actually a good idea anyway, as it would allow you to put tracking analytics on URLs that don’t call things like Google Analytics (since they’re files and not PHP calls).
Option four – If you’re not using their insert code and instead are making the URLs manually, just add &nocache to the end. That one I don;t like at all, but hey, use cases are special things!