FTN14: FutoIn Cache Version: 1.0 Date: 2015-01-22 Copyright: 2014 FutoIn Project (http://futoin.org) Authors: Andrey Galkin
This spec is trying to be as simple as possible to meet very basic needs of caching.
It it expected that Service implementation handles cache hammering mitigation (e.g. by "expiring" ttl for some get requests 10% earlier).
{
"iface" : "futoin.cache",
"version" : "1.0",
"ftn3rev" : "1.1",
"funcs" : {
"get" : {
"params" : {
"key" : {
"type" : "string",
"desc" : "Unique cache key"
}
},
"result" : {
"value" : {
"type" : "any",
"desc" : "Any previously cached value"
}
},
"throws" : [
"CacheMiss"
],
"desc" : "Trivial cached value retrieval"
},
"set" : {
"params" : {
"key" : {
"type" : "string",
"desc" : "Unique cache key"
},
"value" : {
"type" : "any",
"desc" : "arbitrary value to cache"
},
"ttl" : {
"type" : "integer",
"desc" : "Time to live in milliseconds"
}
},
"desc" : "Trivial cached value storing"
},
"custom" : {
"params" : {
"cmd" : {
"type" : "string",
"desc" : "Implementation-defined custom command"
},
"prm" : {
"type" : "any",
"desc" : "Implementation-defined custom command parameters"
}
}
}
},
"requires" : [
"SecureChannel"
],
"desc" : "Audit Log interface"
}
=END OF SPEC=