Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: PHP - only seems to run one instance?

$
0
0
Thanks again, I will look at how to use this more when I get home. I have been reading through the settings and some shown examples and I have a question you may be able to answer. So I have these 2 settings

opcache.revalidate_freq
opcache.validate_timestamps

They both read to do a similar thing except that one can disable checks and the other can't.

Is there a way to set it up so it will always cache unless the file has been updated? I.E. The cache stays, but checks the file last modification time each request. If newer then recache, if the same then just server the file.

I don't know how much checking the timestamp on each request would effect the performance but it shouldn't be a lot as it won't be compiling again unless it's different.

Am I understanding it correctly? If so, how would I set this? As I can often change files on my server a lot, and I need updates as soon as possible from when the changed were made, but I don't want to be recaching the files every time it checks the timestamp.

I hope that makes sense, If not I will try and word it differently. As this could be very helpful as every file on my server (even images) get parsed through a php file, so calling an image goes
User > php > read file > echo content

Rather then
User > content

This is due to the way I handle domains, and so domains, along side permissions and a custom .htaccess rule creator (done using php to save a longer nginx configuration file)

Regards,
Jamie

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>