|
@@ 518-523 (lines=6) @@
|
| 515 |
|
|
| 516 |
|
$donors = wp_cache_get( $cache_key, 'donors' ); |
| 517 |
|
|
| 518 |
|
if ( $donors === false ) { |
| 519 |
|
$donors = new Give_Donors_Query( $args ); |
| 520 |
|
$donors = $donors->get_donors(); |
| 521 |
|
|
| 522 |
|
wp_cache_set( $cache_key, $donors, 'donors', 3600 ); |
| 523 |
|
} |
| 524 |
|
|
| 525 |
|
return $donors; |
| 526 |
|
|
|
@@ 547-552 (lines=6) @@
|
| 544 |
|
$cache_key = md5( 'give_donors_count' . serialize( $args ) ); |
| 545 |
|
$count = wp_cache_get( $cache_key, 'donors' ); |
| 546 |
|
|
| 547 |
|
if ( $count === false ) { |
| 548 |
|
$donors = new Give_Donors_Query( $args ); |
| 549 |
|
$count = $donors->get_donors(); |
| 550 |
|
|
| 551 |
|
wp_cache_set( $cache_key, $count, 'donors', 3600 ); |
| 552 |
|
} |
| 553 |
|
|
| 554 |
|
return absint( $count ); |
| 555 |
|
|