Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enhancement/optional feature flag redis caching #1824

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

themarolt
Copy link
Contributor

@themarolt themarolt commented Nov 7, 2023

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 the ActivityService, DataSinkService, and MemberService 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

Oh we're the crew of the @crowd ship, and we sail the code sea
We need to check our feature flags, with Redis caching
So haul away the package.json, and update the dependencies
And pass the redisClient along, to every service

Why

How

🤖 Generated by Copilot at 0b8b8d2

  • Add @crowd/redis package as a dependency of @crowd/feature-flags package and import its types and functions in index.ts (link, link, link)
  • Add optional redis and redisTimeoutSeconds parameters to isFeatureEnabled function and implement caching logic using RedisCache class in @crowd/feature-flags package (link, link)
  • Pass redisClient and 60 as arguments to isFeatureEnabled function calls in ActivityService, DataSinkService, and MemberService classes (link, link, link, link, link, link, link)
  • Add redisClient as a private property of MemberService class and inject it as a dependency (link, link)
  • Fix missing name property of @crowd/common package and link local redis package to root project in package-lock.json file (link, link, link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screenshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@themarolt themarolt added the Improvement Created by Linear-GitHub Sync label Nov 7, 2023
@themarolt themarolt merged commit 2973105 into main Nov 8, 2023
9 checks passed
@themarolt themarolt deleted the enhancement/unleash-redis-caching-C-2501 branch November 8, 2023 07:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants