ccrz.ccApiPrivateCache.fetch
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Signature
global static Map<String, Object> fetch(Map<String, Object>)
Service Layer Classes
This method doesn't support service layer extensions or overrides.
Inputs (Required)
Map<String, Object> that must include the following required keys:
- ccrz.ccApi.API_VERSION
- The version of the B2B Commerce for Visualforce API to reference for the method call. We recommend that you use the ccrz.ccApi.CURRENT_VERSION constant whenever possible, and only reference a specific version for compatibility if necessary.
- ccrz.ccApiPrivateCache.CACHE_NAME
- String that specifies a Cache Name for the private cache records to query, such as
ccConfig.
ccrz.ccApiPrivateCache.CACHE_NAME => 'ccConfig'
Inputs (Optional)
The input map can also include the following keys:
- ccrz.ccApiPrivateCache.LOCALE
- String that specifies a locale to filter the queried cached data by.
- ccrz.ccApiPrivateCache.PAGENAME
- String that specifies the name of a page whose cached data you want to query. Use the
page keys defined in CC Admin global settings,
such as hp for Home page and plp for
Product List
page.
ccrz.ccApiPrivateCache.PAGENAME => 'hp'
To query cached data from all pages, specify All. If you don't include this key in your input map, the method uses All by default.
ccrz.ccApiPrivateCache.PAGENAME => 'All'
- ccrz.ccApiPrivateCache.STORE_NAME
- String that specifies a storefront whose cached data you want to query.
ccrz.ccApiPrivateCache.STORE_NAME => 'DefaultStore'
To query cached data from all storefronts, specify Global. If you don't include this key in your input map, the method uses Global by default.
ccrz.ccApiPrivateCache.STORE_NAME => 'Global'
Fallback Behavior
Depending on which values you include in the input map, this method incrementally falls back to a less specific query, in the following order of priority.
Priority | ccrz.ccApiPrivateCache.STORE_NAME Value | ccrz.ccApiPrivate.PAGENAME Value | ccrz.ccApiPrivateCache.LOCALE Value |
---|---|---|---|
1 | The exact value specified | The exact value specified | The exact value specified |
2 | The exact value specified | The exact value specified | Any locale with the same language component |
3 | The exact value specified | The exact value specified | None |
4 | The exact value specified | All | The exact value specified |
5 | The exact value specified | All | Any locale with the same language component |
6 | The exact value specified | All | None |
7 | Global | The exact value specified | The exact value specified |
8 | Global | The exact value specified | Any locale with the same language component |
9 | Global | The exact value specified | None |
10 | Global | All | The exact value specified |
11 | Global | All | Any locale with the same language component |
12 | Global | All | None |
Outputs
Map<String, Object> that can include the following keys:
- ccrz.ccApi.API_VERSION
- Integer that indicates which API version was used for the query.
- ccrz.ccApi.SUCCESS
- Boolean
Value Usage true The call completed. false The call encountered errors. - ccrz.ccApiPrivateCache.CONTENT
- String of the cached data that matches the query.