File caching and new version is not loaded with send_file in python

I am using send_file for letting my users to download new version of my files. All the files store in the specific path, now with send_file I want to send the updated files to users, but it seems that it is been caching and unless the file is new with new records, the old file is being download for them. I searched a lot and found out to set cache_timeout=0 but it does not work!

return send_file(path,as_attachment=True, cache_timeout=0) 

I searched and found @cache.cached(timeout=0) I put it in my code but still not working:

@cache.cached(timeout=0) 

Does anyone have any idea?

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.