this post was submitted on 02 May 2024
1 points (100.0% liked)

PHP

1 readers
2 users here now

founded 2 years ago
 

When you are deploying code to a server and not with containers then it is critical to know how to properly restart Opcache. Why? Opcache never throws old files out of the cache. Therefore, if a new version is deployed in a completely new directory, all files from the old version will remain in the [...]

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 6 months ago

@symfonystation I’ve been using systemctl restart php-from for a long time.

The problem with any of these other tools is that they always rely on some php code to refresh the opcache. But what if the opcache has an outdated version of that code cached?

I’ve been bitten by it a couple of times. So restart php-fpm is far more reliable for me.

#php