File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,18 @@ ss_echo "${COLOR_INFO}Running ss-purge-opcache... ${COLOR_RESET}"
6565# ### D. SS-Purge-OPcache: Purge OPcache Via WP-CLI #################################################
6666# ###################################################################################################
6767
68- # # by default OPcache only caches PHP files for a few seconds but we clear it to be sure ##
69- # # this snippet will also clear physical OPcache files if the feature is enabled ##
68+ # # clears in-memory OPcache using WP-CLI ensuring updated scripts load without any delay ##
69+ # # does not remove physical OPcache files, only resets cached PHP files in memory ##
7070
7171sudo -u " ${SFTP_USER} " " ${PATH_WP_CLI} " --path=" ${PATH_WEB_ROOT} " eval ' if (function_exists("opcache_reset")) { opcache_reset(); }'
7272
7373# ###################################################################################################
7474# ### E. SS-Purge-OPcache: Purge OPcache Via PHP Script (Fallback) ##################################
7575# ###################################################################################################
7676
77+ # # creates and executes temporary PHP script to manually reset OPcache via curl request ##
78+ # # always runs regardless of WP-CLI method, ensures OPcache is cleared properly ##
79+
7780# # generate unique filename ##
7881RANDOM_STRING_PURGE_OPCACHE=$( openssl rand -hex 12)
7982PURGE_OPCACHE_FILE=" /var/www/html/purge-${RANDOM_STRING_PURGE_OPCACHE} .php"
You can’t perform that action at this time.
0 commit comments