A high-performance storage solution for the Internet Computer that serves assets via HTTP endpoints with certified responses.
The Storage Canister is a specialized component designed to efficiently store and serve assets on the Internet Computer. Unlike DFINITY's asset canisters, it uses stable memory for storage with an intelligent caching system in heap memory, providing better performance and reliability.
- Stable Memory Storage: Assets are primarily stored in stable memory, ensuring persistence across canister upgrades
- Intelligent Caching: Implements a sophisticated caching system in heap memory for frequently accessed assets
- Certified HTTP Responses: Serves assets with certified HTTP responses for secure content delivery
- Cache Miss Handling: Automatically handles cache misses by fetching from stable memory
- Memory Management: Efficient memory management with automatic cleanup of heap memory
- High Performance: Optimized for serving assets with minimal latency
- Storage: Assets are stored in stable memory for persistence
- Caching: Frequently accessed assets are cached in heap memory for quick access
- Request Flow:
- When a request comes in, the canister first checks the heap cache
- If the asset is in cache (cache hit), it's served immediately
- If not in cache (cache miss), the canister:
- Converts the query call to an update call
- Frees space in heap memory if needed
- Retrieves the asset from stable memory
- Serves the asset with a certified HTTP response
- Error Handling: If the asset is not available, an appropriate error is returned
We welcome contributions to improve the Storage Canister. Please read our contributing guidelines before submitting pull requests.