Skip to content

[FSSDK-11158] update: add remove method in LRU Cache for CMAB service #366

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

Conversation

FarhanAnjum-opti
Copy link
Contributor

Summary

Added remove method in LRU cache class

Test plan

Added remove method in LRU cache class

Issues

FSSDK-11158

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a remove method to the LRUCache class and includes corresponding tests to ensure it works under various conditions.

  • Implement remove in lib/optimizely/odp/lru_cache.rb
  • Add specs covering removal of existing keys, non-existent keys, zero-sized caches, re-adding keys, and thread safety in spec/odp/lru_cache_spec.rb

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/optimizely/odp/lru_cache.rb Added remove method to delete cache entries
spec/odp/lru_cache_spec.rb New tests for remove behavior under multiple scenarios

Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

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

Looks equivalent to Python-sdk. No flaws. Approved.

@FarhanAnjum-opti FarhanAnjum-opti merged commit b210c55 into master Jul 17, 2025
10 checks passed
@FarhanAnjum-opti FarhanAnjum-opti deleted the farhan-anjum/FSSDK-11158-update-cache-implementation-for-cmab branch July 17, 2025 11:01
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