MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / tenant_isolation

Function tenant_isolation

nodedb/src/engine/sparse/doc_cache.rs:408–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406
407 #[test]
408 fn tenant_isolation() {
409 let mut cache = DocCache::new(16);
410 cache.put(0, 1, "users", "u1", b"tenant1");
411 cache.put(0, 2, "users", "u1", b"tenant2");
412 assert_eq!(cache.get(0, 1, "users", "u1"), Some(b"tenant1".as_slice()));
413 assert_eq!(cache.get(0, 2, "users", "u1"), Some(b"tenant2".as_slice()));
414 }
415
416 #[test]
417 fn hit_rate_tracking() {

Callers

nothing calls this directly

Calls 1

putMethod · 0.45

Tested by

no test coverage detected