Skip to content

Conversation

@dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Dec 10, 2025

Mirrors PostHog/posthog-js#2594 / https://posthog.com/tutorials/node-external-cache

This addition allows users to implement their own custom external caching solutions for local evaluation / flag definitions. Implementations would allow for distributed caching of flags definitions, such that one logical service can poll from a single coordinated leader, while other individual instances rely on cached flag definitions while evaluating flags locally.

Example code provided featuring an implementation for Redis, complete with coordination to poll from a single instance.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@dustinbyrne dustinbyrne force-pushed the feat/external-flag-cache branch 2 times, most recently from cd2f61d to e1c2266 Compare December 10, 2025 20:41
@dustinbyrne dustinbyrne force-pushed the feat/external-flag-cache branch from e1c2266 to c6c2f64 Compare December 10, 2025 20:49
@dustinbyrne dustinbyrne requested a review from a team December 11, 2025 21:29
@posthog-project-board-bot posthog-project-board-bot bot moved this to In Review in Feature Flags Dec 11, 2025
Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two minor things, but generally this is a great abstraction

@github-project-automation github-project-automation bot moved this from In Review to Approved in Feature Flags Dec 11, 2025
The defined types don't leave room for missing or optional keys. We'll
use the types as they're defined.
@dustinbyrne dustinbyrne merged commit b6dbff1 into master Dec 12, 2025
15 checks passed
@dustinbyrne dustinbyrne deleted the feat/external-flag-cache branch December 12, 2025 16:31
@github-project-automation github-project-automation bot moved this from Approved to Done in Feature Flags Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants