ICBucket
ICPay Cloud guide
On-chain encrypted file storage
ICBucket
On-chain encrypted file storage
ICBucket
On-chain encrypted file storage
Guides
Optimization patterns for optimal throughput, caching headers, cycle burn minimization, and edge delivery.
Follow these production guidelines to maximize performance and minimize cycles consumption when storing on-chain with ICBucket.
The Internet Computer consensus layer has an ingress message payload threshold (2MB). When uploading large files:
Static assets (images, fonts, scripts, media) should leverage long-lived immutable cache directives:
await bucket.uploadFile("banner.webp", buffer, {
contentType: "image/webp",
cacheControl: "public, max-age=31536000, immutable",
})This guarantees sub-50ms latency from regional edge caches without touching canister update cycles.
Inspect cache response headers with curl:
curl -I https://cdn.icpay.app/cloud/my-assets/banner.webpVerify that Cache-Control: public, max-age=31536000, immutable and CF-Cache-Status: HIT are returned.