Modules in Space are system-level pipelines that perform predefined operations, such as caching or auditing. Modules are added via attributes to handler methods and require registration through extension methods.
Multi-Project Note: Module-decorated handlers in satellite libraries are picked up automatically when a single root project sets
<SpaceGenerateRootAggregator>true</SpaceGenerateRootAggregator>. SeeMultiProjectSetup.md.
- In-Memory Cache: Add
[Cache(Duration = 60)]to a handler and register withservices.AddSpaceInMemoryCache(). - Audit: Add
[Audit]to a handler and register withservices.AddSpaceAudit().
You can implement your own modules by following the interface and configuration standards. See the Space.Modules.InMemoryCache for reference.
services.AddSpaceInMemoryCache();- Modules must be registered via their extension methods.
- Custom modules should follow the required interfaces and provide a config model.