DEV Community

Discussion on: How to Deploy a Vue Application on Cloud Run

Collapse
 
sub8s profile image
Subrahmanya S M • Edited

How add caching for this deployed cloud run url using firebase hosting rewrites firbase.json

for firebase hosting hosted static files+ Cloud run with API we can use caching like this

"rewrites": [
{
"source": "/api/",
"run": {
"serviceId": "myservice-api",

"region": "europe-west1"

}
},
{
"source": "",
"destination": "/index.html"
}
]
and
[
{ "source":"
/user/**", "headers": [{"key": "Cache-Control", "value": "no-cache, no-store"}] }
]

what is if whole dynamic Vue with node runtime hosted in the cloud run and firabase.json
have
"rewrites": [ {
"source": "/helloworld",
"run": {
"serviceId": "helloworld", // "service name" (from when you deployed the container image)
"region": "us-central1" // optional (if omitted, default is us-central1)
}
} ]
how to do caching when we are using dynamic webapp with web firebase SDK ? and liked to firebase hosting ?