Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This enables you to:
- Coordinate fetching so only one worker polls at a time
- Pre-cache definitions for ultra-low-latency flag evaluation

> **Note:** External cache providers are currently available in Node.js and Python SDKs only. This feature is experimental and may change in minor versions.
> **Note:** External cache providers are currently available in the Node.js, Python, and Ruby SDKs.

## When to use an external cache

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Import the interface from the SDK:

```typescript
import { FlagDefinitionCacheProvider, FlagDefinitionCacheData } from 'posthog-node/experimental'
import { FlagDefinitionCacheProvider, FlagDefinitionCacheData } from 'posthog-node'
```

## The interface
Expand Down
2 changes: 1 addition & 1 deletion contents/docs/libraries/ruby-on-rails.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ end
| `feature_flag_request_timeout_seconds` | Integer | `3` | Timeout, in seconds, for feature flag requests. |
| `before_send` | Proc | `nil` | Callback that receives the event hash before it is queued or sent. Return a modified event hash, or `nil` to drop the event. |

The `PostHog.init` block supports the options above. Less common core options like `batch_size`, `disable_singleton_warning`, `skip_ssl_verification`, and the experimental `flag_definition_cache_provider` can be passed as an options hash to `PostHog.init(...)`; see the [Ruby SDK docs](/docs/libraries/ruby#configuration) for details.
The `PostHog.init` block supports the options above. Less common core options like `batch_size`, `disable_singleton_warning`, `skip_ssl_verification`, and `flag_definition_cache_provider` can be passed as an options hash to `PostHog.init(...)`; see the [Ruby SDK docs](/docs/libraries/ruby#configuration) for details.

### Rails-specific options

Expand Down
6 changes: 2 additions & 4 deletions contents/docs/libraries/ruby/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Available client options:
| `before_send` | Proc | `nil` | Callback that receives the event hash before it is queued or sent. Return a modified event hash, or `nil` to drop the event. |
| `disable_singleton_warning` | Boolean | `false` | Suppress warnings about multiple clients with the same API key. Use only when you intentionally need multiple clients. |
| `skip_ssl_verification` | Boolean | `false` | Disable SSL certificate verification. Intended only for local development or custom deployments. |
| `flag_definition_cache_provider` | Object | `nil` | Experimental provider for distributed feature flag definition caching. See [distributed flag definition caching](#distributed-flag-definition-caching). |
| `flag_definition_cache_provider` | Object | `nil` | Provider for distributed feature flag definition caching. See [distributed flag definition caching](#distributed-flag-definition-caching). |

### Filtering or modifying events before sending

Expand Down Expand Up @@ -231,7 +231,7 @@ end

### Distributed flag definition caching

`flag_definition_cache_provider` is an experimental API for sharing locally evaluated feature flag definitions across multiple workers or processes. The provider object must implement:
`flag_definition_cache_provider` shares locally evaluated feature flag definitions across multiple workers or processes. The provider object must implement:

- `flag_definitions` – returns cached definitions as a hash with `:flags`, `:group_type_mapping`, and `:cohorts`, or `nil` if empty.
- `should_fetch_flag_definitions?` – returns `true` if this process should fetch fresh definitions from PostHog.
Expand All @@ -246,8 +246,6 @@ posthog = PostHog::Client.new({
})
```

Because this API is experimental, it may change in future minor versions.

### Remote config payloads

Use `get_remote_config_payload` to fetch the decrypted remote config payload for a flag. This requires `personal_api_key`.
Expand Down
Loading