[
https://issues.apache.org/jira/browse/LOG4PHP-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455163#comment-13455163
]
Sven Rautenberg commented on LOG4PHP-185:
-----------------------------------------
This really cannot go into 2.2.1, as it is released already. Would like to see
it in 2.3 without PHP 5.2 support, though. :)
> Don't clear the entire stat cache on an append
> ----------------------------------------------
>
> Key: LOG4PHP-185
> URL: https://issues.apache.org/jira/browse/LOG4PHP-185
> Project: Log4php
> Issue Type: Improvement
> Reporter: Rasmus Lerdorf
> Fix For: 2.2.1
>
>
> As of PHP 5.3.0 you can selectively clear individual entries from the stat
> cache. So, I suggest this change:
> Index: src/main/php/appenders/LoggerAppenderRollingFile.php
> ===================================================================
> --- src/main/php/appenders/LoggerAppenderRollingFile.php (revision
> 1379664)
> +++ src/main/php/appenders/LoggerAppenderRollingFile.php (working copy)
> @@ -195,7 +195,7 @@
> }
>
> // Stats cache must be cleared, otherwise filesize()
> returns cached results
> - clearstatcache();
> + clearstatcache(true, $this->file);
>
> // Rollover if needed
> if (filesize($this->file) > $this->maxFileSize) {
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira