Used Newie, our AI search tool in the docs? Take a 2-minute survey to rate your experience!

Shopping App catalog caching guide

Prev Next

Between a product change in your ecommerce platform and a shopper's screen, four places can serve an older copy: the shopper's phone, NewStore's edge cache, NewStore's platform caches, and your ecommerce platform's catalog index.

In short, product pages opened by ID, through a deeplink, a universal link, the wishlist, or order history, read the product record directly from your ecommerce platform and are rarely affected. Category listings and search results come from your platform's search index, filtered by the visibility rules agreed for your integration, and every layer on the way to the phone caches them.

Lifetimes and timings in this guide are the NewStore platform's configured values.

Diagram of the four caching layers between your ecommerce platform and the shopper's phone, showing what each layer keeps, for how long, and what empties it. Flush Cache in NewStore Studio clears the two NewStore layers.

Requests flow left to right. Each box names what the layer keeps, for how long, and what empties it. Flush Cache in NewStore Studio clears only the edge cache and the platform caches.

On your shoppers' phones

Shopping App on iOS and Android keeps the pages it has loaded in a standard HTTP cache on the phone, for the lifetime NewStore's API gives each page, and empties that cache when the app is opened from a closed state. The lifetimes are identical on iOS and Android. The only difference is that iOS also empties the cache when the app returns to the foreground after 30 minutes or more in the background; Android does not. Nothing done on the server side, by NewStore or by you, changes what a phone already holds.

Behavior

iOS

Android

Keeps a page for

Up to 5 hours 50 minutes for listings and search results, 24 hours for a product page

The same lifetimes as iOS

Cache emptied when

The app is opened from a closed state, or returns to the foreground after 30 minutes or more in the background

The app is opened from a closed state. Returning to the foreground does not empty it, however long the app was in the background

Not emptied when

The app stays open, or is brought back within 30 minutes

The app stays open, or is brought back from the background after any length of time

How a tester clears it

Force-quit the app and open it again

Force-quit the app and open it again

Everything else in this guide (the edge cache, the platform caches, the index, and the launch procedure) applies to both platforms alike.

A shopper who had a category open before your change keeps that page until it expires or they reopen the app. Shoppers who open the app from a closed state see the new state immediately. When testing, always force-quit and reopen the app before checking.

NewStore's edge cache

In front of the NewStore platform sits a content delivery network (CDN) that keeps one copy of each listing page per storefront, for 5 hours 50 minutes. Copies also live per region, so testers in Europe and shoppers in North America do not share one copy.

Request

Edge lifetime

Category listings, the first page and every next page

5 hours 50 minutes

Search results, and listings with a filter or a sort applied

Not cached. Every request reaches the NewStore platform

Product page

24 hours

Related products

6 hours

Category menu

1 hour

Flush Cache in NewStore Studio removes every edge copy for the selected storefronts at once.

A stale copy comes to exist in the following way. After a flush, the first request for a page creates the new copy, and every later request for that page receives it for its full lifetime. If that first request arrives before your ecommerce platform returns the product, NewStore creates the copy without it, and the copy stays that way for 5 hours 50 minutes, even if your platform catches up minutes later. Because copies exist per page and per region, one device can show the product while another does not.

Your ecommerce platform's own APIs might have caches of their own. Clear those caches, or let their lifetimes expire, before you flush. Otherwise NewStore fetches and stores the stale answer.

NewStore's platform caches

Behind the edge, the NewStore platform keeps its own copies so that a request that misses the edge does not always have to reach your ecommerce platform.

Cache

Holds

Lifetime

Product cache

Product records used for product pages and listing tiles

24 hours

Category menu

Your category tree for a storefront

24 hours

Related products

Recommendations

24 hours

The NewStore platform never caches search results or filtered or sorted listings; they always run live against your ecommerce platform. Flush Cache in NewStore Studio clears all three caches for the selected storefronts, then immediately starts refilling the product cache in the background.

For the scheduled and API-based refreshes of the category cache, see Categories Cache.

Your ecommerce platform's catalog

NewStore integrates with several ecommerce platforms. The phone, the edge cache, the platform caches, and Flush Cache work identically for all of them. What differs is the origin, that is, the system that answers each request: which call answers a product page, which answers a listing, and what being in the index means on your platform.

App screen

What your platform is asked

What must be true

Product page, deeplink, universal link, wishlist, order history

The product, by ID

The product exists, is online or published for that site or store, and is past its online-from date

Category listings, search results, the product picker in NewStore Studio

A catalog search scoped to the app category, or a free-text search

All requirements for a product page, plus: present in the platform's search index, assigned to a category or collection shown in the app, and matching every visibility rule of your integration

What answers listings and search, per platform:

Platform

What answers listings and search

Salesforce Commerce Cloud

The site's search index, through the product search API

Shopify

The collection mapped to the app category, and Shopify product search for free text

Magento

Magento's product search, or Tweakwise where your store uses it for search and navigation

Scayle

Scayle's product and filter API

A custom integration

The search endpoint you provide

Three things hold on every platform:

  • Indexes are per site or store. If you run several, for example one per region, each has its own index. A product can be live on one site while still absent from another site's index until that index updates.

  • The index lags the product record. After a catalog update, a product is often reachable by ID, so deeplinks work, before the search index has caught up. NewStore cannot see when your index ran; only you can.

  • Your platform applies online, publication, and online-from dates. NewStore reads none of them. A product that is not yet published, or has a future online-from date, is absent from your platform's answers until then.

The product picker in NewStore Studio searches your platform live through NewStore and is never cached. If the product picker finds a product, your index has it for the storefront selected in NewStore Studio. This test works before any flush.

Flush Cache in NewStore Studio

Flush Cache clears NewStore's edge and platform caches for the storefronts you select, then refills the product cache in the background. The clearing completes within about two minutes. The refill takes from a few minutes to over an hour, depending on the size of your catalog and on how fast your ecommerce platform answers, and it does not affect when products become visible.

What happens when you select it:

  1. NewStore Studio asks the NewStore platform to refresh the selected storefronts.

  2. Within one to two minutes, the NewStore platform clears the category menu, the product cache, and related products, and finally the edge copies for those storefronts. Until that last step, the NewStore platform still serves the old copies.

  3. The NewStore platform then fetches the first 40 products of every category, one category at a time, so that the first shoppers after the flush get a fast response. How long this takes depends on the size of your catalog and on how fast your ecommerce platform answers: minutes for a small catalog, an hour or more for a large one. Shoppers during the refill receive live data.

Rules:

  • Select every storefront the launch covers. You can flush several storefronts at once.

  • Select it once. A second selection while the refill is still running restarts it and doubles the load on your ecommerce platform.

  • Allow two minutes before checking.

  • Flush only after the product is in your search index. A flush before that creates edge copies without the product, and they stay that way for 5 hours 50 minutes or until the next flush.

Launch procedure

Follow this order: index first, flush second, one flush per storefront.

  1. Replicate the catalog to production and run the search index on every site involved. If your ecommerce platform's APIs have caches of their own, clear them or let them expire too. Do not flush yet.

  2. Confirm the products are in the index. In NewStore Studio, select the launch storefront and search each stock keeping unit (SKU) in the product picker. If the product appears, the index has it for that site. Repeat for each storefront whose site differs.

  3. Check each product's attributes on your platform's side: every visibility rule of your integration, on the master and on the variants. Confirm the product is online with no future online-from date.

  4. Select Flush Cache in NewStore Studio for all storefronts involved, once, only after step 2 holds for each of them.

  5. Wait two minutes.

  6. Force-quit and reopen the app on a test phone. Open the category, open the product page, and search.

  7. If a product is still missing, do not flush again. See Troubleshooting; a second flush only helps if the index has changed since the first.

Shoppers already in the app before the flush keep the page they had open until it expires or they reopen the app, up to 5 hours 50 minutes for a listing with the default lifetimes. New sessions see the launch immediately.

NewStore can be on standby for a launch and confirm within minutes of your flush that the products are returned to the app. Send the SKUs and the storefronts in advance.

Troubleshooting

Start from the symptom. You can run the check in the What to check column yourself. The What to do column says what to change or what to send NewStore.

Symptom

Most likely cause

What to check

What to do

The deeplink works, but the product is missing from listings and from the product picker in NewStore Studio

Not in the search index, or a visibility attribute

Search your platform for the SKU on that site. Check the visibility attributes on master and variants

Run the site's index, or fix the attribute, then flush

NewStore Studio finds it, the app listing does not

An edge copy or a phone copy made before the change

Check that you flushed after NewStore Studio found it, and that the test app was force-quit and reopened

Flush once. Force-quit and reopen the app

Visible on some devices, not on others, same storefront

An edge copy created before the index had the product

Compare the time of the flush against the time the index ran

Flush again now that the index has it. Next time, index first

Still missing after a flush, on a reopened app

The flush has not completed, a different storefront was selected, or the product is still not in the index

Wait two minutes. Check the storefront selected in NewStore Studio. Search the product picker

Repeat the relevant step

Still missing on a phone that stayed open

The phone's own copy

Force-quit and reopen the app

Expected behavior

Shown as sold out in the listing, but purchasable

The variant your platform uses to represent the product has no stock

Check which variant represents the product in your platform, and its stock

Load stock on that variant, or change the representative variant

Visible on one storefront, not another

Per-site index, or a country rule

Search the product picker with that storefront selected. Check the country attribute

Run the index on that site, or extend the country list

Deeplink says not found on one site, product exists on another

Not online or not assigned on that site

Check the product's site or store assignment in your platform

Assign the product to the site

When you report that a cache was cleared, say which one: a force-quit and reopen on the phone, or Flush Cache in NewStore Studio. They are different layers, and both can be needed.

Limits

Three limits to plan around:

  • Edge copies live 5 hours 50 minutes. The only way to replace them early is a flush in NewStore Studio. Otherwise, wait for the edge copies to expire.

  • Phones empty their cache only when the app is opened from a closed state. iOS also empties it after 30 minutes in the background, but Android does not empty the cache.

  • Requests by ID, such as deeplinks and universal links, bypass the visibility rules.