Medis 2 User Guide
HomePricing
  • Welcome!
  • Reference
    • Key Browser
    • Command Query
    • Custom URL Scheme
  • Settings
    • Custom Encoders
    • Content Rules
    • Custom SSH Config
    • Language Settings
    • Delete Confirmation Dialog
    • Default Database
  • Connect to your database
    • DigitalOcean
    • Upstash Redis
    • Cluster
    • AWS ElastiCache
    • Amazon MemoryDB for Redis
  • Integrations
    • 🔐1Password SSH agent
Powered by GitBook
On this page

Was this helpful?

  1. Settings

Content Rules

Last updated 2 years ago

Was this helpful?

By default, Medis attempts to select the most suitable encoder and viewer based on the content of the key. However, in certain scenarios, this automatic detection may fail. Additionally, the automatic detection does not take custom encoders into consideration, primarily due to performance constraints.

To address these limitations, Medis allows users to configure explicit content rules for encoders and viewers, based on the key name or type. This enables users to customize the encoding and decoding process, ensuring that the appropriate encoder and viewer are used for each key.

Create a New Rule

To create a new rule, open the connection config modal and select the content rules tab.

Click the + button to create a new rule.

When

There are two conditions, and only when the two conditions are satisfied at the same time, the preferred viewer and encoder will apply. If the key name pattern is left empty, all key names pass the condition.

The key name pattern supports glob rules like * and ?.

Then

You can set either viewer or encoder or both of them. "Auto" is Medis's default behavior. For Hash/List/Set/Sorted Set keys, the viewer/encoder will be applied to their fields.