mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-11 18:56:18 +09:00
Include client_id in transient to avoid multiple athelete collisions
This commit is contained in:
@@ -83,9 +83,9 @@ class WPStrava_API {
|
||||
public function get( $uri, $args = null ) {
|
||||
|
||||
// @see https://stackoverflow.com/a/3764390/2146022
|
||||
$arg_suffix = is_array( $args ) ? '_' . substr( md5( wp_json_encode( $args ), true ), 0, 12 ) : '';
|
||||
$arg_suffix = is_array( $args ) ? '_' . substr( md5( wp_json_encode( $args ) ), 0, 12 ) : '';
|
||||
|
||||
$transient_key = 'strava_api_data_' . $uri . $arg_suffix;
|
||||
$transient_key = 'strava_api_data_' . $this->client_id . '_' . $uri . $arg_suffix;
|
||||
|
||||
$data = get_transient( $transient_key );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user