feat(cache): Add lightweight in-memory cache with TTL and LRU eviction

This commit is contained in:
cogwheel0
2025-11-22 21:53:14 +05:30
parent 8ed75f8f14
commit c4a36bb51c
14 changed files with 1298 additions and 242 deletions

View File

@@ -30,4 +30,16 @@ sealed class User with _$User {
isActive: json['is_active'] as bool? ?? json['isActive'] as bool? ?? true,
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'username': username,
'email': email,
'name': name,
'profile_image_url': profileImage,
'role': role,
'is_active': isActive,
};
}
}