Skip to content

Make CachingManager initializer public to allow external creation#115

Merged
vazarkevych merged 10 commits into
growthbook:mainfrom
vazarkevych:feature/stickybucketing-cachemanager
Sep 5, 2025
Merged

Make CachingManager initializer public to allow external creation#115
vazarkevych merged 10 commits into
growthbook:mainfrom
vazarkevych:feature/stickybucketing-cachemanager

Conversation

@vazarkevych

@vazarkevych vazarkevych commented Aug 8, 2025

Copy link
Copy Markdown
Collaborator

In this PR we :

  • Make CachingManager initializer public to allow external creation;
  • Added default CachingManager to initializer in StrickyBucketService

…ded default CachingManager to initializer in StrickyBucketService
@Arideno

Arideno commented Aug 8, 2025

Copy link
Copy Markdown

Thanks for the PR! When is it planned to be merged? Without this changes default sticky bucketing is not working

@vazarkevych

Copy link
Copy Markdown
Collaborator Author

Hi @Arideno. We will do our best to release these changes ASAP. We will contact you as soon as they are available.

@Arideno

Arideno commented Aug 15, 2025

Copy link
Copy Markdown

Hey, @vazarkevych. Can I clarify if there is any scheduled review and release date? This is quite an urgent issue for us, as we still cannot use sticky bucketing.

@Arideno

Arideno commented Aug 28, 2025

Copy link
Copy Markdown

Hey, @madhuchavva, can you have a look at this PR? As it's quite important functionality fix. Thank you!

@Arideno

Arideno commented Aug 29, 2025

Copy link
Copy Markdown

Hey, @vazarkevych. Can we merge this now? 🥹

@vazarkevych

vazarkevych commented Aug 29, 2025

Copy link
Copy Markdown
Collaborator Author

Hi @Arideno, sure. We just need to fix conflicts and will merge that.

…ng-cachemanager

# Conflicts:
#	Sources/CommonMain/StickyBucket/StickyBucketService.swift
}


guard let docData = try? JSONEncoder().encode(doc) else { return }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@vazarkevych I think we need to call completion(nil) in else block

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@objc public class StickyBucketService: NSObject, StickyBucketServiceProtocol {
private let prefix: String
private let localStorage: CachingLayer?
private let localStorage = CachingManager()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe we need to set cacheKey somehow?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@vazarkevych vazarkevych merged commit c160608 into growthbook:main Sep 5, 2025
1 check passed
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.

3 participants