← 输入框|github.com|刷新
Skip to content

feat: add lru cache - #395

Merged
Andy Leap (andrewleap-optimizely) merged 3 commits into
masterfrom
aleap/add_lru_cache
Jul 29, 2022
Merged

Andy Leap (andrewleap-optimizely) merged 3 commits into
masterfrom
aleap/add_lru_cache

Conversation

@andrewleap-optimizely

Copy link
Copy Markdown
Contributor

Summary

Add a generic LRU cache to support efficient caching of the ODP segments results.

  • Add Least Recently Used (LRU) cache
  • design to allow developer to pass in different caching implementation. Provide default.

Test plan

Added:

  • test_lru_cache.py

Ticket:

OASIS-8404

Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread tests/test_lru_cache.py Resolved
@Mat001

Copy link
Copy Markdown
Contributor

PS: I still need to approve...I'm curious about Jae's comments first, if any

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! A few changes suggested.

Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread optimizely/odp/lru_cache.py Resolved
Comment thread tests/test_lru_cache.py Resolved
Comment thread tests/test_lru_cache.py Resolved

@Mat001 Matjaz Pirnovar (Mat001) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approve after jae's changes addressed

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All changes look good. One more change suggested.

Comment thread optimizely/odp/lru_cache.py Resolved

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@andrewleap-optimizely
Andy Leap (andrewleap-optimizely) deleted the aleap/add_lru_cache branch July 29, 2022 15:47
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