Bug #75175 [Opn->Fbk]: Opcache_reset() does not clear cache
| From: | ab@php.net | Date: | Wed, 13 Sep 2017 10:28:55 +0000 |
| Subject: | Bug #75175 [Opn->Fbk]: Opcache_reset() does not clear cache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211123@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75175&edit=1
ID: 75175
Updated by: ab@php.net
Reported by: tm8544 at hotmail dot com
Summary: Opcache_reset() does not clear cache
-Status: Open
+Status: Feedback
Type: Bug
Package: opcache
Operating System: Windows 10 x64
PHP Version: 7.2.0RC1
Block user comment: N
Private report: N
New Comment:
Thanks for the report. I'm not sure to understand the issue. The numbers for used_memory are in
both cases equal before and after reset. They differ in different PHP versions, but that
doesn't tell anything about the opcache_reset() functionality. It only tells that something has
changed in other PHP version, which is an implementation detail. Please be more specific.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-09-08 14:56:29] tm8544 at hotmail dot com
Description:
------------
After opcache_reset, with version 7.2.0RC1 "used_memory" still occupies much more memory
than with version 7.1.9. Opcache runtime configuration stays the same.
Expected result shows test script output with PHP 7.1.9,
and actual result shows test script output with PHP 7.2.0RC1.
Test script:
---------------
<html><body><pre><?php
echo "Memory Usage before reset:\r\n";
$a = opcache_get_status();
var_dump($a["memory_usage"]);
echo "----------------------\r\n";
echo "Reset Opcache\r\n";
$ok = opcache_reset();
var_dump($ok);
echo "----------------------\r\n";
echo "Memory Usage after reset:\r\n";
$a = opcache_get_status();
var_dump($a["memory_usage"]);
?></pre></body></html>
Expected result:
----------------
Memory Usage before reset:
array(4) {
["used_memory"]=>
int(701384)
["free_memory"]=>
int(133516344)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
----------------------
Reset Opcache
bool(true)
----------------------
Memory Usage after reset:
array(4) {
["used_memory"]=>
int(701384)
["free_memory"]=>
int(133516344)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
Actual result:
--------------
Memory Usage before reset:
array(4) {
["used_memory"]=>
int(18272056)
["free_memory"]=>
int(115945672)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
----------------------
Reset Opcache
bool(true)
----------------------
Memory Usage after reset:
array(4) {
["used_memory"]=>
int(18272056)
["free_memory"]=>
int(115945672)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75175&edit=1