merged [471] from b1.2: live with wrong system time: allow caching files with mtime in further
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@472 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
8d96b47ea3
commit
6dca4feae6
|
@ -5,6 +5,7 @@ Ini Settings Changes
|
|||
|
||||
ChangeLog
|
||||
========
|
||||
* live with wrong system time: allow caching files with mtime in further
|
||||
* bug fix for compatibility with Zend Optimizer and other non-cachable
|
||||
* new: xcache.stat = On
|
||||
* could not show module info in admin page when XCache is the last module
|
||||
|
|
4
xcache.c
4
xcache.c
|
@ -775,6 +775,7 @@ static int xc_entry_init_key_php(xc_entry_t *xce, char *filename, char *opened_p
|
|||
int cacheid;
|
||||
xc_entry_data_php_t *php;
|
||||
char *ptr;
|
||||
time_t delta;
|
||||
|
||||
if (!filename || !SG(request_info).path_translated) {
|
||||
return FAILURE;
|
||||
|
@ -829,7 +830,8 @@ not_relative_path:
|
|||
/* fall */
|
||||
|
||||
stat_done:
|
||||
if (XG(request_time) - pbuf->st_mtime < 2 && !xc_test) {
|
||||
delta = XG(request_time) - pbuf->st_mtime < 2;
|
||||
if (abs(delta) < 2 && !xc_test) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue