Skip to content
Pre-release. HostCraft is in testing and not yet for sale. These docs describe the current build and may change. Join the waitlist to hear when it launches.

Cache API

Source: daemon/proto/hostcraft/v1/cache.proto

CacheService manages the per-site nginx FastCGI cache. REST: /api/v1/cache/sites/{site_id}.

Method REST route Permission Streaming
GetSiteCacheConfig GET /api/v1/cache/sites/{site_id} CacheConfigRead unary
UpdateSiteCacheConfig PUT /api/v1/cache/sites/{site_id} CacheConfigWrite unary
PurgeSite POST /api/v1/cache/sites/{site_id}/purge CachePurge unary
PurgeURL POST /api/v1/cache/sites/{site_id}/purge-url CachePurge unary
GetCacheStats GET /api/v1/cache/sites/{site_id}/stats CacheConfigRead unary

/hostcraft.v1.CacheService/GetSiteCacheConfig

/hostcraft.v1.CacheService/UpdateSiteCacheConfig

/hostcraft.v1.CacheService/PurgeSite

/hostcraft.v1.CacheService/PurgeURL

/hostcraft.v1.CacheService/GetCacheStats

Field Type Number Description
site_id string 1 -
entries int64 2 -
size_bytes int64 3 -
hits int64 4 -
misses int64 5 -
hit_ratio double 6 -
sampled_at google.protobuf.Timestamp 7 -
Field Type Number Description
site_id string 1 -
Field Type Number Description
site_id string 1 -
Field Type Number Description
site_id string 1 -
Field Type Number Description
entries_purged int64 1 -
bytes_freed int64 2 -
Field Type Number Description
site_id string 1 -
url string 2 -
Field Type Number Description
fell_back_to_full_purge bool 1 -
Field Type Number Description
site_id string 1 -
account_id string 2 -
enabled bool 3 -
ttl_seconds int64 4 -
max_size_mb int64 5 -
keys_zone_size_mb int64 6 -
methods repeated string 7 -
status_codes repeated int64 8 -
bypass_logged_in bool 9 -
updated_at google.protobuf.Timestamp 10 -
Field Type Number Description
site_id string 1 -
account_id string 2 -
enabled optional bool 3 -
ttl_seconds optional int64 4 -
max_size_mb optional int64 5 -
keys_zone_size_mb optional int64 6 -
methods repeated string 7 -
status_codes repeated int64 8 -
bypass_logged_in optional bool 9 -
Field Type Number Description
config SiteCacheConfig 1 -
workflow_id string 2 -