community: trim premium backend surfaces
This commit is contained in:
@@ -6,26 +6,17 @@ rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"protocol-graphql",
|
||||
"protocol-grpc",
|
||||
"protocol-soap",
|
||||
"protocol-websocket",
|
||||
]
|
||||
protocol-graphql = ["dep:crank-adapter-graphql"]
|
||||
protocol-grpc = ["dep:crank-adapter-grpc"]
|
||||
protocol-soap = ["dep:crank-adapter-soap"]
|
||||
protocol-websocket = ["dep:crank-adapter-websocket"]
|
||||
default = []
|
||||
protocol-graphql = []
|
||||
protocol-grpc = []
|
||||
protocol-soap = []
|
||||
protocol-websocket = []
|
||||
|
||||
[dependencies]
|
||||
aes-gcm.workspace = true
|
||||
async-trait = "0.1"
|
||||
base64.workspace = true
|
||||
crank-adapter-graphql = { path = "../crank-adapter-graphql", optional = true }
|
||||
crank-adapter-grpc = { path = "../crank-adapter-grpc", optional = true }
|
||||
crank-adapter-rest = { path = "../crank-adapter-rest" }
|
||||
crank-adapter-soap = { path = "../crank-adapter-soap", optional = true }
|
||||
crank-adapter-websocket = { path = "../crank-adapter-websocket", optional = true }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-mapping = { path = "../crank-mapping" }
|
||||
crank-schema = { path = "../crank-schema" }
|
||||
@@ -40,8 +31,6 @@ tracing.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
axum.workspace = true
|
||||
crank-adapter-grpc = { path = "../crank-adapter-grpc", features = ["test-support"] }
|
||||
futures-util = "0.3"
|
||||
time.workspace = true
|
||||
tokio-tungstenite.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
|
||||
@@ -824,12 +824,8 @@ fn response_cache_ttl(operation: &RuntimeOperation) -> Option<Duration> {
|
||||
return None;
|
||||
}
|
||||
|
||||
let is_cacheable_protocol = match &operation.target {
|
||||
Target::Rest(target) => target.method == HttpMethod::Get,
|
||||
Target::Graphql(target) => target.operation_type == crank_core::GraphqlOperationType::Query,
|
||||
Target::Grpc(target) => target.read_only,
|
||||
_ => false,
|
||||
};
|
||||
let is_cacheable_protocol =
|
||||
matches!(&operation.target, Target::Rest(target) if target.method == HttpMethod::Get);
|
||||
if !is_cacheable_protocol {
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user