MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_wire_protocol_cache

Function test_wire_protocol_cache

src/cache/wire_protocol_cache.rs:112–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111 #[test]
112 fn test_wire_protocol_cache() {
113 let cache = WireProtocolCache::new(10);
114
115 let response = CachedWireResponse {
116 row_description: vec![],
117 encoded_rows: vec![],
118 row_count: 0,
119 };
120
121 cache.put("SELECT 1".to_string(), response.clone());
122 assert!(cache.get("SELECT 1").is_some());
123 assert!(cache.get("SELECT 2").is_none());
124 }
125
126 #[test]
127 fn test_is_cacheable() {

Callers

nothing calls this directly

Calls 2

putMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected