dify/api/core/sandbox
Harry a8074f4f4a feat: add DB inline content cache for app asset draft files
Introduce app_asset_contents table as a read-through cache over S3 for
text-like asset files (e.g. .md skill documents). This eliminates N
individual S3 fetches during SkillBuilder builds — bulk_load pulls all
content in a single SQL query with S3 fallback on miss.

Key components:
- CachedContentAccessor: DB-first read / dual-write / S3 fallback
- AssetContentService: static DB operations (get, get_many, upsert, delete)
- should_mirror(): single source of truth for extension-based policy
- Alembic migration for app_asset_contents table

Modified callers:
- SkillBuilder uses accessor.bulk_load() instead of per-node S3 reads
- AppAssetService.get/update_file_content route through accessor
- delete_node cleans both DB cache and S3
- draft_app_assets_initializer uses should_mirror() instead of hardcoded .md
2026-03-10 17:12:14 +08:00
..
bash fix: update files_url to use FILES_API_URL in DifyCliConfig 2026-02-15 17:19:08 +08:00
entities feat(sandbox): add SSH agentbox provider for middleware and docker deployments 2026-02-09 16:38:05 +08:00
initializer feat: add DB inline content cache for app asset draft files 2026-03-10 17:12:14 +08:00
inspector feat: add DB inline content cache for app asset draft files 2026-03-10 17:12:14 +08:00
services fix(asset_download_service): suppress error output during download command execution 2026-01-23 17:06:11 +08:00
storage feat: enhance file upload process with content type detection and command building 2026-02-05 18:00:45 +08:00
utils feat(sandbox): add AppAssetsInitializer and refactor VMFactory to VMBuilder 2026-01-15 00:13:52 +08:00
__init__.py feat(sandbox-zip-service): using sandbox to zip files 2026-01-27 14:19:27 +08:00
builder.py feat(sandbox): add SSH agentbox provider for middleware and docker deployments 2026-02-09 16:38:05 +08:00
manager.py feat(sandbox): refactor sandbox file handling to include app_id 2026-01-30 22:45:28 +08:00
sandbox.py Revert "refactor: replace threading with gevent primitives for cooperative scheduling" 2026-01-28 13:51:48 +08:00