About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

Time:2021-10-20

When I visited the locally launched SAP Spartacus storefront, I observed a total of 23 OCC API calls in the chrome developer tool:

http://localhost:4200/electro…

About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

These 23 OCC API calls can be functionally divided into three groups:

Group 1: contains a request

/occ/v2/electronics-spa/cms/pages?lang=en&curr=USD
About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

Cache-Control in request headers: no-cache

The value of the client HTTP request cache control is no cache, which tells the server to verify the cache validity before sending the response to the client
About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

The value of the response header field cache control returned by the server: private

About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

According to the followingfile, the response with cache control: private should not be cached in the CDN.

About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

After the pages OCC API call is completed, the other 22 OCC APIs can be triggered.

The second group: contains five requests

(1) /occ/v2/electronics-spa/languages?lang=en&curr=USD

request header:Cache-Control: no-cache
response header:public, max-age=1800

(2) /occ/v2/electronics-spa/currencies?lang=en&curr=USD

request header:Cache-Control: no-cache
response header:public, max-age=1800

(3) /occ/v2/electronics-spa/cms/components?fields=DEFAULT&currentPage=0&pageSize=26&componentIds=AllBrandsCategoryLink%2CCanonBrandCategoryLink%2CSonyBrandCategoryLink%2CKodakBrandCategoryLink%2CSamsungBrandCategoryLink%2CToshibaBrandCategoryLink%2CFujifilmBrandCategoryLink%2CKingstonBrandCategoryLink%2CIciduBrandCategoryLink%2CTDKBrandCategoryLink%2CSweexBrandCategoryLink%2CDigitalCamerasCategoryLink%2CDigitalCompactsCategoryLink%2CDigitalSLRCategoryLink%2CFilmCamerasCategoryLink%2CHandheldCamcordersCategoryLink%2CWebcamsCategoryLink%2CCameraAccessoriesCategoryLink%2CCamerasFlashesCategoryLink%2CTripodsCategoryLink%2CCameraLensesCategoryLink%2CFlashMemoryCategoryLink%2CPowerSuppliesCategoryLink%2CColourFilmsCategoryLink%2CBlackAndWhiteFilmsCategoryLink%2CBlankVideotapesCategoryLink&lang=en&curr=USD

request header:Cache-Control: no-cache
response header:private

(4) /occ/v2/electronics-spa/cms/components?fields=DEFAULT&currentPage=0&pageSize=8&componentIds=AboutSAPCommerceLink%2CFAQLink%2CVisitSAPLink%2CContactUsLink%2CAgileCommerceBlogLink%2CLinkedInLink%2CFacebookLink%2CTwitterLink&lang=en&curr=USD

request header:Cache-Control: no-cache
response header:private

(5) /occ/v2/electronics-spa/users/anonymous/consenttemplates?lang=en&curr=USD

request header:Cache-Control: no-cache
response header:no-cache, no-store, max-age=0, must-revalidate

The third group: contains 17 requests

/occ/v2/electronics-spa/products/<product-code>?fields=code,configurable,configuratorType,name,summary,price(formattedValue),images(DEFAULT,galleryIndex),baseProduct&lang=en&curr=USD

request header:Cache-Control: no-cache
response header:private, max-age=120

About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

We can easily observe the queuing of concurrent requests of these OCC APIs in the browser in the chrome developer tool.
About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

According to Google ChromeHelp documentation, this queuing and stalled queuing occurs on the client.
About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

More Jerry’s original articles are: “Wang Zixi”:
About the OCC API request triggered when the homepage of SAP e-commerce cloud is loaded

Recommended Today

SQL exercise 20 – Modeling & Reporting

This blog is used to review and sort out the common topic modeling architecture, analysis oriented architecture and integration topic reports in data warehouse. I have uploaded these reports to GitHub. If you are interested, you can have a lookAddress:https://github.com/nino-laiqiu/TiTanI recorded a relatively complete development process in my hexo blog deployed on GitHub. You can […]