|
@@ 1559-1561 (lines=3) @@
|
| 1556 |
|
} while ( 0 ); |
| 1557 |
|
|
| 1558 |
|
// Expire old keys. |
| 1559 |
|
foreach ( $stats_cache as $k => $cache ) { |
| 1560 |
|
if ( ! is_array( $cache ) || 300 < time() - key( $cache ) ) { |
| 1561 |
|
unset( $stats_cache[ $k ] ); |
| 1562 |
|
} |
| 1563 |
|
} |
| 1564 |
|
|
|
@@ 1676-1680 (lines=5) @@
|
| 1673 |
|
} |
| 1674 |
|
|
| 1675 |
|
// Expire old keys. |
| 1676 |
|
foreach ( $stats_cache as $k => $cache ) { |
| 1677 |
|
if ( ! is_array( $cache ) || ( 5 * MINUTE_IN_SECONDS ) < time() - key( $cache ) ) { |
| 1678 |
|
unset( $stats_cache[ $k ] ); |
| 1679 |
|
} |
| 1680 |
|
} |
| 1681 |
|
|
| 1682 |
|
// Set cache. |
| 1683 |
|
$stats_cache[ $cache_key ] = array( |