You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To increase page load, and to reduce load-spikes on web and api during peak period, the previously discussed pre-caching pages concept could be achieved by the following method.
Fetch only updatedAt, and filterable field from all datasources attached to all pages. In the example given, this would be categoryHandle, title and of course, updatedAt.
Filter results based on requestParams and routes
Taking all possible combinations of required parameters, e.g. category (categoryHandle) to create a list of page queries, noting that some documents can appear under multiple queries. In this example, the article Article about sport exists under sports and all.
Overview
To increase page load, and to reduce load-spikes on web and api during peak period, the previously discussed pre-caching pages concept could be achieved by the following method.
Reduce page parameters
For each page, evaluate the page routes and reduce to a list of parameters
Results:
Evaluate datasource requestParams
Fetch datasource results
Fetch only
updatedAt
, and filterable field from all datasources attached to all pages. In the example given, this would becategoryHandle
,title
and of course,updatedAt
.Filter results based on requestParams and routes
Taking all possible combinations of required parameters, e.g.
category
(categoryHandle
) to create a list of page queries, noting that some documents can appear under multiple queries. In this example, the articleArticle about sport
exists undersports
andall
./news/sports/article-about-sport
/news/all/article-about-sport
Pre-cache updated pages
For those page queries that have one or more documents with a
updatedAt
later than the last time the page was cached, re-cache the pageRefresh cache on non-updated pages
For those page queries that have no documents with an
updatedAt
later than the last time the page was cached, extend the cacheI may have missed something here, feedback appreciated.
The text was updated successfully, but these errors were encountered: