Smart collection sort via API does not reflect in frontend quickly

Hi, We are working on an app which helps users custom sort collections. We are using the smart collection sort api. https://shopify.dev/docs/api/admin-rest/2023-01/resources/smartcollection#put-smart-collections-smart-collection-id-order?products[]=921728736&products[]=632910392

We are setting the sort order to manual and then passing the product ids according to sort order. The change is reflecting in the admin if I go to Admin → Products → Collections → Specific sorted collection. But the change does not immediately show up on frontend. Sometimes the change takes hours to reflect. I think there is some caching in the frontend collection listing page. But not sure how to clear the cache and force the front end to refresh for the specific collection listing.

Cant find any api to achieve this. Not sure if this is the right place to ask this question. But if possible please help with this.

1 Like

Hi, Thanks for the reply. So we are mostly trying to do this via API using our custom sorting app which we are developing. We even tried to change the collection title and roll it back via API. Also tried to unpublish and republish the content via api and that too did not help.

Am guessing sorting the collection via API should auto clear the cache. But its a little comfortable to know that there is caching cause this has been driving me nuts for the past 3 days. After couple of hours that cache does clear but seeing the change immediately would have been such a great experience for the end users.