Skip to content

Commit

Permalink
Fix: store list filter caching in with geolocation. (getdokan#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon authored Mar 14, 2024
1 parent 6d7b57b commit 98cab74
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions includes/Vendor/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,8 @@ public function get_vendors( $args = [] ) {
unset( $args['status'] );
unset( $args['featured'] );

$cache_group = 'vendors';
$cache_key = 'vendors_' . md5( wp_json_encode( $args ) );
$user_query = Cache::get( $cache_key, $cache_group );

if ( false === $user_query ) {
$user_query = new WP_User_Query( $args );

Cache::set( $cache_key, $user_query, $cache_group );
}

$results = $user_query->get_results();
$user_query = new WP_User_Query( $args );
$results = $user_query->get_results();

$this->total_users = $user_query->total_users;

Expand Down

0 comments on commit 98cab74

Please sign in to comment.