In a storefront there are many links to varius Product Pages. They are rendered dynamically, based on the routing configuration and the product's data
Now we make some repetitive computations on the routing config on every time we render a link in the UI. But the config is static, so any computations could be made once and results cached.
Candidates to cache in the SemanticPathService (where path means a path from config):
In a storefront there are many links to varius Product Pages. They are rendered dynamically, based on the routing configuration and the product's data
Now we make some repetitive computations on the routing config on every time we render a link in the UI. But the config is static, so any computations could be made once and results cached.
Candidates to cache in the
SemanticPathService
(wherepath
means a path from config):this.urlParser.getPrimarySegments(path)
this.getParams(path)
See https://github.com/SAP/spartacus/blob/167801c/projects/core/src/routing/configurable-routes/url-translation/semantic-path.service.ts#L155