Skip to content

Conversation

@vegaro
Copy link
Member

@vegaro vegaro commented Jan 14, 2026

Based off #5959

Refactored from a grouped dictionary format to individual keys per attribute:

  • Before: com.revenuecat.userdefaults.subscriberAttributes{ "userID1": { "height": {...}, "weight": {...} } }
  • After: com.revenuecat.userdefaults.subscriberAttributes.userID1.height{ attribute data }

This eliminates read-modify-write (RMW) operations entirely since each attribute write is now a single atomic key write, removing the need for locking.

A migration function (migrateGroupedToIndividualKeys) handles upgrading existing data from the old format.

# Conflicts:
#	Sources/Caching/DeviceCache.swift
@RevenueCat-Danger-Bot
Copy link

1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency
pr:changelog_ignore The PR will not be included in the changelog. This label doesn't determine the type of bump of the version and must be combined with pr:feat, pr:fix or pr:other.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants