mvx_cache_patterns
OfficialOptimize MultiversX storage reads/writes.
Authormultiversx
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the high gas costs associated with frequent storage operations on the MultiversX blockchain by implementing efficient caching strategies.
Core Features & Use Cases
- Gas Optimization: Significantly reduces transaction fees by minimizing expensive storage reads and writes.
- In-Memory Caching: Loads storage values into a struct on function entry and commits changes on exit, making intermediate reads free.
- Selective Write-Back: Only writes back modified fields, further saving gas.
- Use Case: For smart contract endpoints that read three or more storage values, using these cache patterns can lead to substantial gas savings.
Quick Start
Implement the write-back cache pattern with a Drop trait for your contract's storage fields.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: mvx_cache_patterns Download link: https://github.com/multiversx/mx-ai-skills/archive/main.zip#mvx-cache-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.