# CacheBean 模块 ## 模块概述 CacheBean 模块是基于注解处理器的对象缓存框架,提供自动生成的对象缓存和序列化功能。 ## 子模块结构 - **cache-bean-annotation**: 缓存注解定义 - **cache-bean-api**: 缓存API接口 - **cache-bean-compiler**: 编译时代码生成器 ## 主要功能 - **注解驱动**: 通过注解自动生成缓存代码 - **对象序列化**: 自动对象序列化和反序列化 - **缓存管理**: 内存缓存和持久化缓存 - **生命周期**: 缓存生命周期自动管理 ## 使用方式 ```kotlin @CacheBean data class UserInfo( val id: String, val name: String, val avatar: String ) // 自动生成缓存操作 UserInfoCache.put("key", userInfo) val cached = UserInfoCache.get("key") ``` ## 构建配置 ```gradle implementation "com.wenext.android:frame-cachebean-api:6.0.0" kapt "com.wenext.android:frame-cachebean-compiler:6.0.0" ```