Update cache
curl --request PATCH \
--url https://cloud.laravel.com/api/caches/{cache} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"auto_upgrade_enabled": true,
"is_public": true,
"uses_hibernation": true,
"hibernation_timeout": 30
}
'import requests
url = "https://cloud.laravel.com/api/caches/{cache}"
payload = {
"name": "<string>",
"auto_upgrade_enabled": True,
"is_public": True,
"uses_hibernation": True,
"hibernation_timeout": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
auto_upgrade_enabled: true,
is_public: true,
uses_hibernation: true,
hibernation_timeout: 30
})
};
fetch('https://cloud.laravel.com/api/caches/{cache}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.laravel.com/api/caches/{cache}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'auto_upgrade_enabled' => true,
'is_public' => true,
'uses_hibernation' => true,
'hibernation_timeout' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.laravel.com/api/caches/{cache}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cloud.laravel.com/api/caches/{cache}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.laravel.com/api/caches/{cache}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "caches",
"attributes": {
"name": "<string>",
"auto_upgrade_enabled": true,
"is_public": true,
"uses_hibernation": true,
"hibernation_timeout": 123,
"created_at": "2023-11-07T05:31:56Z",
"connection": {
"hostname": "<string>",
"port": 123,
"": {
"username": "<string>",
"password": "<string>"
}
}
},
"relationships": {
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "environments",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"created_from_automation": true,
"vanity_domain": "<string>",
"build_command": "<string>",
"deploy_command": "<string>",
"uses_octane": true,
"uses_hibernation": true,
"hibernation_wake_up_interval": 123,
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"network_settings": {
"cache": {
"strategy": "<string>"
},
"response_headers": {
"frame": "<string>",
"content_type": "<string>",
"hsts": {
"max_age": 123,
"include_subdomains": true,
"preload": true
}
},
"firewall": {
"bot_categories": [],
"rate_limit": {
"429": true,
"4xx": true
},
"under_attack_mode_started_at": "<string>",
"block_path": true
},
"content_converter": true
},
"created_at": "2023-11-07T05:31:56Z",
"": {
"environment_variables": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"relationships": {
"application": {
"data": {
"type": "applications",
"id": "<string>"
}
},
"branch": {
"data": {
"type": "branches",
"id": "<string>"
}
},
"deployments": {
"data": [
{
"type": "deployments",
"id": "<string>"
}
]
},
"currentDeployment": {
"data": {
"type": "deployments",
"id": "<string>"
}
},
"domains": {
"data": [
{
"type": "domains",
"id": "<string>"
}
]
},
"primaryDomain": {
"data": {
"type": "domains",
"id": "<string>"
}
},
"instances": {
"data": [
{
"type": "instances",
"id": "<string>"
}
]
},
"database": {
"data": {
"type": "databaseSchemas",
"id": "<string>"
}
},
"cache": {
"data": {
"type": "caches",
"id": "<string>"
}
},
"buckets": {
"data": [
{
"type": "filesystems",
"id": "<string>"
}
]
},
"websocketApplication": {
"data": {
"type": "websocketApplications",
"id": "<string>"
}
}
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Caches
Update cache
Update a cache.
PATCH
/
caches
/
{cache}
Update cache
curl --request PATCH \
--url https://cloud.laravel.com/api/caches/{cache} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"auto_upgrade_enabled": true,
"is_public": true,
"uses_hibernation": true,
"hibernation_timeout": 30
}
'import requests
url = "https://cloud.laravel.com/api/caches/{cache}"
payload = {
"name": "<string>",
"auto_upgrade_enabled": True,
"is_public": True,
"uses_hibernation": True,
"hibernation_timeout": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
auto_upgrade_enabled: true,
is_public: true,
uses_hibernation: true,
hibernation_timeout: 30
})
};
fetch('https://cloud.laravel.com/api/caches/{cache}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.laravel.com/api/caches/{cache}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'auto_upgrade_enabled' => true,
'is_public' => true,
'uses_hibernation' => true,
'hibernation_timeout' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.laravel.com/api/caches/{cache}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cloud.laravel.com/api/caches/{cache}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.laravel.com/api/caches/{cache}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"auto_upgrade_enabled\": true,\n \"is_public\": true,\n \"uses_hibernation\": true,\n \"hibernation_timeout\": 30\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "caches",
"attributes": {
"name": "<string>",
"auto_upgrade_enabled": true,
"is_public": true,
"uses_hibernation": true,
"hibernation_timeout": 123,
"created_at": "2023-11-07T05:31:56Z",
"connection": {
"hostname": "<string>",
"port": 123,
"": {
"username": "<string>",
"password": "<string>"
}
}
},
"relationships": {
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "environments",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"created_from_automation": true,
"vanity_domain": "<string>",
"build_command": "<string>",
"deploy_command": "<string>",
"uses_octane": true,
"uses_hibernation": true,
"hibernation_wake_up_interval": 123,
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"network_settings": {
"cache": {
"strategy": "<string>"
},
"response_headers": {
"frame": "<string>",
"content_type": "<string>",
"hsts": {
"max_age": 123,
"include_subdomains": true,
"preload": true
}
},
"firewall": {
"bot_categories": [],
"rate_limit": {
"429": true,
"4xx": true
},
"under_attack_mode_started_at": "<string>",
"block_path": true
},
"content_converter": true
},
"created_at": "2023-11-07T05:31:56Z",
"": {
"environment_variables": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"relationships": {
"application": {
"data": {
"type": "applications",
"id": "<string>"
}
},
"branch": {
"data": {
"type": "branches",
"id": "<string>"
}
},
"deployments": {
"data": [
{
"type": "deployments",
"id": "<string>"
}
]
},
"currentDeployment": {
"data": {
"type": "deployments",
"id": "<string>"
}
},
"domains": {
"data": [
{
"type": "domains",
"id": "<string>"
}
]
},
"primaryDomain": {
"data": {
"type": "domains",
"id": "<string>"
}
},
"instances": {
"data": [
{
"type": "instances",
"id": "<string>"
}
]
},
"database": {
"data": {
"type": "databaseSchemas",
"id": "<string>"
}
},
"cache": {
"data": {
"type": "caches",
"id": "<string>"
}
},
"buckets": {
"data": [
{
"type": "filesystems",
"id": "<string>"
}
]
},
"websocketApplication": {
"data": {
"type": "websocketApplications",
"id": "<string>"
}
}
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
The Bearer Token generated on the Cloud UI.
Path Parameters
The cache identifier
Body
application/json
Required string length:
3 - 40Pattern:
^[a-z0-9_-]+$Available options:
250mb, 1gb, 2.5gb, 5gb, 12gb, 50gb, 100gb, 500gb, valkey-flex-250mb, valkey-flex-1gb, valkey-flex-2.5gb, valkey-pro.250mb, valkey-pro.1gb, valkey-pro.2.5gb, valkey-pro.5gb, valkey-pro.12gb, valkey-pro.25gb, valkey-pro.50gb, elasticache.cache.r7g.large, elasticache.cache.r7g.xlarge, elasticache.cache.r7g.2xlarge, elasticache.cache.r7g.4xlarge, elasticache.cache.r7g.8xlarge, elasticache.cache.r7g.12xlarge, elasticache.cache.r7g.16xlarge, elasticache.cache.c7gn.large, elasticache.cache.c7gn.xlarge, elasticache.cache.c7gn.2xlarge, elasticache.cache.c7gn.4xlarge, elasticache.cache.c7gn.8xlarge, elasticache.cache.c7gn.12xlarge, elasticache.cache.c7gn.16xlarge Only available for Valkey.
Available options:
allkeys-lru, noeviction, volatile-lru, allkeys-random, volatile-random, volatile-ttl, allkeys-lfu, volatile-lfu Required range:
1 <= x <= 60Was this page helpful?
⌘I

