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

Impl service upon moka #844

Closed
Tracked by #8167
Xuanwo opened this issue Oct 12, 2022 · 5 comments · Fixed by #852
Closed
Tracked by #8167

Impl service upon moka #844

Xuanwo opened this issue Oct 12, 2022 · 5 comments · Fixed by #852
Assignees

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Oct 12, 2022

No description provided.

@ClSlaid
Copy link
Contributor

ClSlaid commented Oct 12, 2022

Do you mean moka-rs?

@Xuanwo
Copy link
Member Author

Xuanwo commented Oct 12, 2022

Yes. We can use moka as a new service for caching.

@Xuanwo
Copy link
Member Author

Xuanwo commented Oct 12, 2022

@ClSlaid Oh, I didn't see your self-assgined...

@ClSlaid
Copy link
Contributor

ClSlaid commented Oct 12, 2022

@ClSlaid Oh, I didn't see your self-assgined...

It's ok, I just began on this.

Now I should try to continue porting it as a cache layer I think.

@PsiACE
Copy link
Member

PsiACE commented Oct 12, 2022

Now I should try to continue porting it as a cache layer I think.

Does it mean that we only need something like

let _ = Operator::from_env(Scheme::Fs)
    .expect("must init")
    .layer(ContentCacheLayer::new(
        moka::Builder::default().build().expect("must init"),
    ));

Implementing a caching layer for a specific storage backend does not appear to be essential.

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 a pull request may close this issue.

3 participants