Cache Creation
monSQLize creates an in-memory cache by default. You can also pass a cache instance or configure a local/remote multi-level cache.
Default Memory Cache
Use this for local development and small deployments.
Inject a Cache Instance
Use instance injection when the application already owns cache lifecycle.
Multi-Level Cache
Use multi-level cache when several application instances should share a remote cache while keeping fast local reads.
Distributed Invalidation
Distributed invalidation is best-effort. If the database write succeeds but Redis publish fails, monSQLize does not roll back MongoDB.