ScriptCache
scalus.cardano.ledger.ScriptCache
Keeps Plutus scripts across transactions, so a script that many transactions carry or reference is hashed and decoded once.
A PlutusScript caches its hash and its decoded program itself, but every decoded transaction brings new script instances, so without a cache each evaluation hashes and decodes every script again. intern hands back the first instance seen with the same language and bytes, and with it the work already done on it. One cache can serve several evaluators, for example one per slot configuration.
The least recently used script is dropped when the cache is full. Safe to share between threads.
Value parameters
- maxEntries
-
how many scripts to keep
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article