Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] opcache invalidate #24709

Closed
wants to merge 1 commit into from
Closed

[4.0] opcache invalidate #24709

wants to merge 1 commit into from

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Apr 23, 2019

Pull Request for Issue #24678 .

Summary of Changes

porting of #21949 on 4.x

Testing Instructions

see #24678

Expected result

setting saved in global configuration setting

Actual result

not saved at 1st save

@wilsonge
Copy link
Contributor

If we're doing this we should probably call the full suite of functions

// opcode cache busting before including the filename
if (function_exists('opcache_invalidate'))
{
opcache_invalidate($filename);
}
if (function_exists('apc_compile_file'))
{
apc_compile_file($filename);
}
if (function_exists('wincache_refresh_if_changed'))
{
wincache_refresh_if_changed(array($filename));
}
if (function_exists('xcache_asm'))
{
xcache_asm($filename);
}

@ghost ghost changed the title [4.0][com_config] opcache invalidate [4.0] opcache invalidate Apr 23, 2019
@alikon
Copy link
Contributor Author

alikon commented Apr 23, 2019

i've only opcache available to test 🤕 ....

@ghazal
Copy link
Contributor

ghazal commented Apr 23, 2019

Something should be done one way or the other.
Anyhow this works.

@twister65
Copy link
Contributor

twister65 commented Apr 25, 2019

OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.
This extension is bundled with PHP 5.5.0 and later.

OPcache is the most usual. It is used on cloudaccess.net servers. I think the others are optional, as I did in these commits:
76b4634
eb5c9b5
Some of the other functions are not longer maintained and are deprecated.
See joomla-framework/filesystem#19 (comment)

@twister65
Copy link
Contributor

I have tested this item ✅ successfully on ede7190


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24709.

@wilsonge
Copy link
Contributor

wilsonge commented May 5, 2019

This has effectively been merged with the merging in of 3.9.1 earlier today. I still think we should add in all the cache functions that we support officially (obviously no issues dropping the ones no longer required in php 7)

@wilsonge wilsonge closed this May 5, 2019
@alikon alikon deleted the patch-117 branch May 6, 2019 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants