[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Wed Jun 10 08:50:55 UTC 2020
#36455: Call opcache_reset() after plug-in, theme or core update
-------------------------------------------+---------------------------
Reporter: nigro.simone | Owner: mikeschroder
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.5
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing early | Focuses:
-------------------------------------------+---------------------------
Comment (by ayeshrajans):
Thanks for the quick response @nextendweb. I understand your point
clearing cache eagerly should get priority over having broken code.
There was a mistake in 36455.10.patch, that it did not properly check the
invalidation criterion. I will follow-up with 2 patches:
- 36455.11.patch
This one is same as 36455.10.patch, but now correctly determines if the
cache should be cleared. `opcache.validate_timestamps` === 0, or any non-
zero `opcache.revalidate_freq` value now triggers the cache to be cleared.
- 36455.11-no-timestampcheck.patch
Same patch, but without the timestamp/freq precautions. This takes a more
wildcard approach.
I'm personally a bit hesitant to clear opcache unless we absolutely have
to. Clearing opcache itself should be faster because it only clears the
memory, but the next time the file needs to be cached, it requires the
disk hit which might be catastrophic specially on shared servers if an
automated update is triggered in a short time-span.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:77>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list