diff --git a/micro-service/README.md b/micro-service/README.md index 8cf8ed8d..0d140541 100644 --- a/micro-service/README.md +++ b/micro-service/README.md @@ -66,6 +66,18 @@ For the 'FeatureFeed' embed, which displays the church's content, add `data-type _⚠️ Make sure to replace [INSERT_CHURCH_SLUG_HERE] with your church's unique identifier, or 'slug'._ +### Disabling Caching for Local Testing + +For local development and testing purposes, you might want to disable caching to ensure you're receiving the latest responses directly from the API. To do this, please refer to the Apollo client configuration file: + +[../packages/web-shared/client/apollosApiLink.js](../packages/web-shared/client/apollosApiLink.js) + +In this file, locate the header configuration within the `apollosApiLink` function and uncomment the following line: + +```javascript +// 'x-cache-me-not': 1, + + ### Options | data-type | diff --git a/packages/web-shared/client/apollosApiLink.js b/packages/web-shared/client/apollosApiLink.js index 0341af19..c31eb635 100644 --- a/packages/web-shared/client/apollosApiLink.js +++ b/packages/web-shared/client/apollosApiLink.js @@ -8,6 +8,8 @@ const apollosApiLink = (church_slug) => headers: { ...headers, 'x-church': church_slug, + // Uncomment the following line to disable caching + // 'x-cache-me-not': 1, }, })); diff --git a/web-embeds/README.md b/web-embeds/README.md index 534280cc..81d9cfd4 100644 --- a/web-embeds/README.md +++ b/web-embeds/README.md @@ -76,6 +76,18 @@ For the 'FeatureFeed' embed, which displays the church's content, add `data-type _⚠️ Make sure to replace [INSERT_CHURCH_SLUG_HERE] with your church's unique identifier, or 'slug'._ +### Disabling Caching for Local Testing + +For local development and testing purposes, you might want to disable caching to ensure you're receiving the latest responses directly from the API. To do this, please refer to the Apollo client configuration file: + +[../packages/web-shared/client/apollosApiLink.js](../packages/web-shared/client/apollosApiLink.js) + +In this file, locate the header configuration within the `apollosApiLink` function and uncomment the following line: + +```javascript +// 'x-cache-me-not': 1, +``` + ### Options | data-type | @@ -118,3 +130,4 @@ _⚠️ Make sure to replace [INSERT_CHURCH_SLUG_HERE] with your church's unique | ymca_gc | --- +```