• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Zend OPcache "opcache.validate_timestamps" value for Production Forum?

RoldanLT

Well-known member
#1
What is the recommended value for this config: opcache.validate_timestamps ?
For a Live Forum, when I use value of 0, should I reload php or clear cache every time I modified core files?
Like adding new addons, updating addons or upgrading XenForo core.
 

Brent W

Well-known member
#2
I just leave it at 60. Revalidating every 1 minute isn't going to cause any issues and lets me not have to worry about restarting nginx or clearing cache when I change a template due to them being cached as php files.
 

RoldanLT

Well-known member
#5
I just read this:

opcache.validate_timestamps - When this is enabled, PHP will check the file timestamp per your opcache.revalidate_freq value.

When it’s disabled, opcache.revaliate_freq is ignored and PHP files are NEVER checked for updated code. So, if you modify your code, the changes won’t actually run until you restart or reload PHP (you force a reload with kill -SIGUSR2).

Yes, this is a pain in the ass, but you should use it. Why? While you’re updating or deplying code, new code files can get mixed with old ones— the results are unknown. It’s unsafe as hell.