-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve LayergroupID AKA cache hit ratio #925
Comments
Nice summary ;) This made me think about how to improve the cache hit ratio, I have a couple of questions here: What are the changes in MapConfig that must affect the
|
This is part of the issue, understanding what affects the Layergroupid. As you are saying, adding
It will, but do we care? I mean, there will be some maps that before were having several layergroupids during their different incarnations (i.e., when adding different dataviews), now they will share sometimes some URLs. Another example is CARTO.JS, where you might be adding widgets dynamically during your application lifecycle. The more we reuse URLs, the better the experience will be, but also the fewer resources we will use. |
Rendering a map in CARTO is a two-phase operation:
The set of URLs is unique for each different set of layers. Creating the very same map –the same set of layers– results in the very same set of URLs. That's cache friendly; if nothing changes, the client will reuse most of the resources: from browser cache to CDN cached requests.
That set of layers is called, in CARTO terms, a MapConfig. But a MapConfig is, nowadays, way more than that. When we started to work on the first iteration of widgets, and later on the analyses, for Builder, we introduced those two new resources on the MapConfig. Making possible to define, along with the set of layers, a set of analyses and a set of widgets.
In contrast, the cache-friendliness of the URLs went away: now, the URLs change for every change in the MapConfig. This should not be this way: only specific changes must affect the set of URLs for each resource.
The text was updated successfully, but these errors were encountered: