AdaptySDK 4.1.2
Loading...
Searching...
No Matches
AdaptySDK.AdaptyPlacementFetchPolicy Class Referencesealed

Whether a fetch may answer from the cache, and for how long. Pick one of the shared instances or build one with ReturnCacheDataIfNotExpiredElseLoad. More...

Public Member Functions

override string ToString ()
 A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Static Public Member Functions

static AdaptyPlacementFetchPolicy ReturnCacheDataIfNotExpiredElseLoad (TimeSpan maxAge)
 Use the cache while it is younger than maxAge , and ask the server once it is older.

Static Public Attributes

static readonly AdaptyPlacementFetchPolicy ReloadRevalidatingCacheData
 Ask the server, and fall back to the cache when it cannot be reached. The default.
static readonly AdaptyPlacementFetchPolicy ReturnCacheDataElseLoad
 Use the cache when there is anything in it, however old, and only ask the server otherwise.
static readonly AdaptyPlacementFetchPolicy Default = ReloadRevalidatingCacheData
 The policy used when none is given — the same instance as ReloadRevalidatingCacheData.

Detailed Description

Whether a fetch may answer from the cache, and for how long. Pick one of the shared instances or build one with ReturnCacheDataIfNotExpiredElseLoad.

Member Function Documentation

◆ ReturnCacheDataIfNotExpiredElseLoad()

AdaptyPlacementFetchPolicy AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataIfNotExpiredElseLoad ( TimeSpan maxAge)
static

Use the cache while it is younger than maxAge , and ask the server once it is older.

◆ ToString()

override string AdaptySDK.AdaptyPlacementFetchPolicy.ToString ( )

A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Member Data Documentation

◆ Default

readonly AdaptyPlacementFetchPolicy AdaptySDK.AdaptyPlacementFetchPolicy.Default = ReloadRevalidatingCacheData
static

The policy used when none is given — the same instance as ReloadRevalidatingCacheData.

◆ ReloadRevalidatingCacheData

readonly AdaptyPlacementFetchPolicy AdaptySDK.AdaptyPlacementFetchPolicy.ReloadRevalidatingCacheData
static
Initial value:
= new(
"reload_revalidating_cache_data",
null
)

Ask the server, and fall back to the cache when it cannot be reached. The default.

◆ ReturnCacheDataElseLoad

readonly AdaptyPlacementFetchPolicy AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataElseLoad
static
Initial value:
= new(
"return_cache_data_else_load",
null
)

Use the cache when there is anything in it, however old, and only ask the server otherwise.


The documentation for this class was generated from the following file:
  • Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPlacementFetchPolicy.cs