meldestelle/infrastructure
stefan 7592adfbb5 refactor(infra-cache): Refine module with Kotlin idioms and robust tests
This commit introduces a comprehensive refactoring of the cache module to improve code consistency, API ergonomics, and test robustness.

Code Refinements & Improvements
Standardized on kotlin.time: Replaced all usages of java.time.Instant and java.time.Duration with their kotlin.time counterparts (Instant, Duration). This aligns the module with the project-wide standard established in the core module and avoids type conversions.

Added Idiomatic Kotlin API: Introduced inline extension functions with reified type parameters for get() and multiGet(). This allows for a cleaner, more type-safe call syntax (e.g., cache.get<User>("key")) for Kotlin consumers.

Code Cleanup: Removed redundant @OptIn(ExperimentalTime::class) annotations from data classes by setting the compiler option at the module level in cache-api/build.gradle.kts.

Testing Enhancements
Stabilized Offline-Mode Tests: Re-implemented the previously disabled offline capability tests. The new approach uses MockK to simulate RedisConnectionFailureException instead of trying to stop/start the Testcontainer. This allows for reliable and robust testing of the "dirty key" synchronization logic.

Fixed Compilation Errors: Resolved various compilation errors in the test suite that arose from the type refactoring and incorrect mock setups.
2025-08-09 14:57:44 +02:00
..
auth fixing Gradle 2025-08-01 11:31:29 +02:00
cache refactor(infra-cache): Refine module with Kotlin idioms and robust tests 2025-08-09 14:57:44 +02:00
event-store fix Redis 2025-08-01 14:00:55 +02:00
gateway refactor(core): Stabilize and Refactor Shared Kernel 2025-08-05 18:25:21 +02:00
messaging fixing gradle build 2025-08-01 00:04:50 +02:00
monitoring fixing gradle build 2025-08-01 00:04:50 +02:00
README-INFRASTRUCTURE.md fixing gradle build 2025-07-30 00:01:22 +02:00