mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
21 lines
588 B
Cap'n Proto
21 lines
588 B
Cap'n Proto
@0xf6520578f143b471;
|
|
|
|
using CSharp = import "programming_language/csharp.capnp";
|
|
$CSharp.namespace("FabAccessAPI.Schema");
|
|
|
|
using import "utils.capnp".UUID;
|
|
|
|
struct Cache(Value) {
|
|
id @0 :UUID;
|
|
key @1 :Data;
|
|
value @2 :Cacheable(Value);
|
|
}
|
|
|
|
interface Cacheable(Value) {
|
|
get @0 () -> (key :Data, value :Value);
|
|
# Access the cached value. This returns both the value and the associated
|
|
# key. A consumer MUST use the Key returned here instead of the one stored
|
|
# in `Cache`, as it might have changed between being sent the `Cache`
|
|
# struct and calling `get`.
|
|
}
|