1
submitted 6 months ago by symfonystation@kbin.social to c/php@kbin.social

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 [...]

top 1 comments
sorted by: hot top controversial new old
[-] michael@mstdn.thms.uk 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

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

PHP

1 readers
1 users here now

founded 2 years ago