I am trying to make a cache class that makes url into a static file. When I click ‘Cache’ button on the backend, it might cause users to see error on their browsers since files do not support lock. Am I correct???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming you’re concerned that when a file is in the process of being cached (i.e. being written to) there may be problems with Apache trying to read from the file which may result in Apache returning an error that is subsequently displayed in a browser..
I don’t believe you’re correct, but this may depend on the operating system and web server being used.
Under Linux + Apache, I’ve observed the following behaviour:
For example, if you are uploading a file via FTP and that same file is being read by Apache, you can’t complete the write until Apache has finished reading the file.
In such contexts, Apache appears to wait until the write is complete.