Loading...
Loading...
Use when deploying static assets (CSS, JS, fonts, build artifacts) to Tigris — asset pipelines, cache headers, CDN delivery, covers Next.js, Remix, Rails, Django, Laravel, Express
npx skill4agent add tigrisdata/skills tigris-static-assetsCache-Controltigris help || npm install -g @tigrisdata/cli@tigrisdata/climain-abc123.jsCache-Control: public, max-age=31536000, immutable# For immutable, hashed assets (CSS, JS bundles)
Cache-Control: public, max-age=31536000, immutable
# For mutable assets (manifest files, index.html)
Cache-Control: public, max-age=0, must-revalidate
# For fonts
Cache-Control: public, max-age=31536000, immutabletigris cp dist/main-abc123.js t3://my-assets/main-abc123.js \
--cache-control "public, max-age=31536000, immutable" \
--content-type "application/javascript"import { put } from "@tigrisdata/storage";
await put("assets/main-abc123.js", fileBuffer, {
access: "public",
contentType: "application/javascript",
});#!/bin/bash
# scripts/deploy-assets.sh
BUCKET="my-app-assets"
BUILD_DIR="dist"
# Upload hashed assets with long cache
tigris cp "$BUILD_DIR/" "t3://$BUCKET/" -r \
--cache-control "public, max-age=31536000, immutable"
echo "Assets deployed to t3://$BUCKET/"./resources/nextjs.md./resources/remix.md./resources/express.md./resources/rails.md./resources/django.md./resources/laravel.md| Strategy | Example | Use When |
|---|---|---|
| Content hash in filename | | Build tools generate hashed names (Vite, Webpack) |
| Query string | | Legacy systems without hashed filenames |
| Directory versioning | | Major version changes |
immutableCache-Control: immutable