Skip to content

feat: add shared token storage and lastPublished* fields - #140

Open
Ayzrian wants to merge 3 commits into
amplience:masterfrom
Ayzrian:feat/storage-for-token
Open

feat: add shared token storage and lastPublished* fields#140
Ayzrian wants to merge 3 commits into
amplience:masterfrom
Ayzrian:feat/storage-for-token

Conversation

@Ayzrian

@Ayzrian Ayzrian commented Feb 21, 2023

Copy link
Copy Markdown

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Build (npm run build) was run locally and any changes were pushed
  • Tests (npm run test) for the changes have been added (for bug fixes / features)
  • Docs (npm run doc) have been reviewed and added / updated if needed (for bug fixes / features)
  • PR title and git commit messages conform to the conventionalcommits specification

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behaviour?

Each DynamicContent instance has one in memory stored access token.

The ContentItem does not have lastPublishedDate and lastPublishedVersion presented in the SDK.

What is the new behaviour?

  • The token storage now can be provided as a separate class, which can help in a serverless environment, where servers go up and down in a matter of seconds, in that way we reduce the number of API calls to the Amplience Auth server. By default, the SDK will use InMemoryStorage.
  • Also added lastPublishedDate and lastPublishedVersion to the SDK types, as they were missing.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant