Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local storage bounding for iOS #48

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

louisg1337
Copy link
Contributor

This change is a continuation of issue 1020 in which we were putting a bound on the number of entries that can be stored under a specific key in the local storage. The iOS change is now finished, I essentially copied the same code I used from the Android change and just implemented it here. For testing I did the same thing that I did in the Android version. I added BOUND+1 entries of dummy data to "CURR_GEOFENCE_LOCATION", and then I ran the code, making sure that we were left with only BOUND-1 number of previous entries, and then the current entry. I attached a log file below that demonstrates the BOUND+1 test that I did, given that BOUND = 3. At the very start you can see that I added 4 filler NSDictionary values to the local storage, and then at the end of the file we end up with only 2 of those filler NSDictionary objects, and the 1 actual CURR_GEOFENCE_LOCATION value.

bounding_local_storage_ios.pdf

…e. This prevents infinite growth of data entered in the local storage.
Copy link
Contributor

@shankari shankari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM barring extra addition to header file.
I am happy to merge once that is fixed.

src/ios/BEMBuiltinUserCache.h Outdated Show resolved Hide resolved
@shankari
Copy link
Contributor

@louisg1337 Can you also bump up the version number since we already published a version with only the android changes? I will then merge and you can bump up the number in the phone repo.

@louisg1337
Copy link
Contributor Author

Just bumped up version number!

@shankari shankari merged commit 65258b8 into e-mission:master Jan 15, 2024
@shankari
Copy link
Contributor

@louisg1337 Created new release https://github.com/e-mission/cordova-usercache/releases/tag/v1.1.8
you can now bump up the version in the phone repo

@louisg1337
Copy link
Contributor Author

@shankari Here is the bumped up phone repo PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants