When a user uploads an image on my Visualforce page, it correctly adds or updates the document in a document folder in Salesforce. When the document is added or removed, if I refresh the page, the change is displayed immediately. However, if I just change the picture, the change does not take effect for a while... I assume this may be some caching issue with salesforce? But setting cache="false" on my page did not do anything.
Is there a way to reflect the changes of document bodies immediately? (When document is updated, everything but the MIME type and body are the same, including name). Or is my a valid option to delete that document and re-insert it when the user 'updates' the image instead of just trying to update the content of the document?
I am also grabbing the image url on load in a variable getter in my controller like:
'/servlet/servlet.FileDownload?file=' + emailLogoDoc.Id;
I am not sure if there is some setting I can set to stop the caching so it grabs what is actually in the document on every reload/query, or if it is the way I am getting the image Url that is the problem.