Enhancement/optional feature flag redis caching #1824
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at 0b8b8d2
This pull request adds Redis caching to the feature flag service and its consumers in the data sink worker. It modifies the
isFeatureEnabled
function and its calls in the@crowd/feature-flags
package and theActivityService
,DataSinkService
, andMemberService
classes. It also updates the dependencies and the lock file accordingly. The goal is to improve the performance and consistency of the feature flag checks.
🤖 Generated by Copilot at 0b8b8d2
Why
How
🤖 Generated by Copilot at 0b8b8d2
@crowd/redis
package as a dependency of@crowd/feature-flags
package and import its types and functions inindex.ts
(link, link, link)redis
andredisTimeoutSeconds
parameters toisFeatureEnabled
function and implement caching logic usingRedisCache
class in@crowd/feature-flags
package (link, link)redisClient
and60
as arguments toisFeatureEnabled
function calls inActivityService
,DataSinkService
, andMemberService
classes (link, link, link, link, link, link, link)redisClient
as a private property ofMemberService
class and inject it as a dependency (link, link)name
property of@crowd/common
package and link localredis
package to root project inpackage-lock.json
file (link, link, link, link)Checklist ✅
Feature
,Improvement
, orBug
.Add screenshots to the PR description for relevant FE changesNew backend functionality has been unit-tested.API documentation has been updated (if necessary) (see docs on API documentation).