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

Cache promotion strategies #6

Open
ericdmoore opened this issue Aug 30, 2023 · 1 comment
Open

Cache promotion strategies #6

ericdmoore opened this issue Aug 30, 2023 · 1 comment

Comments

@ericdmoore
Copy link
Owner

  • Pull to top
  • Ahead of time
  • evented
  • scheduled
  • ML based
  • ensemble
@ericdmoore
Copy link
Owner Author

ericdmoore commented Feb 16, 2024

Some where in the code is a cache interface. Something where you can compose cache layers. Likely fast expensive ones on top, and cheap, slow, large ones on bottom.

After you compose these layers - you are left with pull vs push questions for how to operate the cache.

Pull to top

basically descends the cache cake looking in each layer for the ID, then pulling it out to the top, until there is no more room in the "icing"

Assumptions

  1. repeat queries are likely enough to warrant filling up the top layer with "recent" queries.

  2. It's too hard to know ahead of time what will be requested so just stay in a reactionary mode.

ML Ordered

Using some ML model - to predict, and then reinforce what will be requested.

Assumptions

  1. Assets have natural clumps, due to the semantics within the assets (for example the hrefs available). So when cache gets a request for the file1 in some 8 part series. Go ahead and queue up 2, 3 and the most popular episode or whatever the model predicts will be likely request in the next few minutes.

  2. Cache Misses may or may not act like a pull-to-top. Although if there are bandwidth considerations that may also influence the pull to top configuration.

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

No branches or pull requests

1 participant