nodedb 0.4.0

Local-first, real-time, edge-to-cloud hybrid database for multi-modal workloads
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: BUSL-1.1

//! Collision-free cache identities for static and catalog JWKS providers.

/// Build a static cache identity disjoint from the catalog domain.
pub(super) fn static_cache_identity(provider_name: &str) -> String {
    format!("static:{}:{provider_name}", provider_name.len())
}

/// Build a catalog identity bound to its endpoint and disjoint from static identities.
pub(super) fn catalog_cache_identity(provider_name: &str, jwks_uri: &str) -> String {
    format!(
        "catalog:{}:{provider_name}:{}:{jwks_uri}",
        provider_name.len(),
        jwks_uri.len()
    )
}