Skip to content

feat: [FFM-12306]: Enhance caching key#153

Merged
knagurski merged 3 commits intomainfrom
FFM-12306-enhance-caching-key
Feb 7, 2025
Merged

feat: [FFM-12306]: Enhance caching key#153
knagurski merged 3 commits intomainfrom
FFM-12306-enhance-caching-key

Conversation

@knagurski
Copy link
Contributor

This PR adds the new deriveKeyFromTargetAttributes cache config option. This allows the use of target attributes when building up the key that's used to store and retrieve evaluations from the cache.

// use all attributes when deriving key
const client = initialize(apiKey, target, {
  cache: {
    deriveKeyFromTargetAttributes: true
  }
})

// use subset of attributes when deriving key
const client = initialize(apiKey, target, {
  cache: {
    deriveKeyFromTargetAttributes: ['attributeA', 'attributeB']
  }
})

@knagurski knagurski self-assigned this Feb 7, 2025
@knagurski knagurski merged commit 23d59df into main Feb 7, 2025
1 check passed
@knagurski knagurski deleted the FFM-12306-enhance-caching-key branch February 7, 2025 13:11
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.

2 participants