GetCachedVariationAsync | getCachedVariationAsync method

StoreServicesExperimentVariation.GetCachedVariationAsync | getCachedVariationAsync method

Retrieves the current locally cached variation assignment for the specified experiment.

Syntax


public:
static IAsyncOperation<StoreServicesExperimentVariationResult>^ GetCachedVariationAsync(
  String^ experimentProjectId
)

Parameters

experimentProjectId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The project ID of the experiment for which you want to retrieve the locally cached variation assignment.

Return value

Type: IAsyncOperation<StoreServicesExperimentVariationResult>

A StoreServicesExperimentVariationResult that represents the result of the asynchronous operation. This object provides access to the locally cached variation assignment.

Remarks

This method retrieves the locally cached variation assignment for the experiment that is associated with the specified project ID.

When you retrieve an experiment variation in your app, we recommend that you first call GetCachedVariationAsync to get the locally cached variation assignment. Before using the variation assignment, use the IsStale property to determine whether there is an updated variation assignment available from the server. If there is, then call the GetRefreshedVariationAsync method to get the latest variation assignment.

For a code example that demonstrates how to use this method, see Code your experiment in your app.

Requirements

Minimum supported client

Windows 10

Minimum supported server

None supported

Minimum supported phone

Windows 10 Mobile

Namespace

Microsoft.Services.Store.Engagement
Microsoft::Services::Store::Engagement [C++]

Metadata

Microsoft.Services.Store.Engagement.winmd

See also

Code your experiment in your app
StoreServicesExperimentVariation

 

 

Show:
© 2017 Microsoft