Path: redb-route/redb.Route.Cache/CacheKeys.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Cache/CacheKeys.cs
----
namespace redb.Route.Cache;
///
/// How a region and a key become one store key. The region is length-prefixed, so region a
/// with key b:c and region a:b with key c never share an entry, and clearing a
/// region never reaches a neighbour whose name merely starts the same way.
///
internal static class CacheKeys
{
/// The store key of in .
public static string For(string region, string key) => $"{region.Length}:{region}:{key}";
/// The prefix every key of starts with (region-wide clear).
public static string Prefix(string region) => $"{region.Length}:{region}:";
}