|
@@ 1672-1676 (lines=5) @@
|
| 1669 |
|
} |
| 1670 |
|
|
| 1671 |
|
// Expire old keys. |
| 1672 |
|
foreach ( $stats_cache as $k => $cache ) { |
| 1673 |
|
if ( ! is_array( $cache ) || ( 5 * MINUTE_IN_SECONDS ) < time() - key( $cache ) ) { |
| 1674 |
|
unset( $stats_cache[ $k ] ); |
| 1675 |
|
} |
| 1676 |
|
} |
| 1677 |
|
|
| 1678 |
|
// Set cache. |
| 1679 |
|
$stats_cache[ $cache_key ] = array( |
|
@@ 1555-1557 (lines=3) @@
|
| 1552 |
|
} while ( 0 ); |
| 1553 |
|
|
| 1554 |
|
// Expire old keys. |
| 1555 |
|
foreach ( $stats_cache as $k => $cache ) { |
| 1556 |
|
if ( ! is_array( $cache ) || 300 < time() - key( $cache ) ) { |
| 1557 |
|
unset( $stats_cache[ $k ] ); |
| 1558 |
|
} |
| 1559 |
|
} |
| 1560 |
|
|