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

[REFACTOR] remove deref impl on Cache type #4670

Closed
Chethan-rao opened this issue May 17, 2024 · 0 comments · Fixed by #4671
Closed

[REFACTOR] remove deref impl on Cache type #4670

Chethan-rao opened this issue May 17, 2024 · 0 comments · Fixed by #4671
Assignees
Labels
C-refactor Category: Refactor

Comments

@Chethan-rao
Copy link
Contributor

Currently Cache is a type having inner value as MokaCache.

pub struct Cache {
    inner: MokaCache<String, Arc<dyn Cacheable>>,
}

There's a deref impl for this type which returns the inner MokaCache. We should instead have custom methods on Cache which calls the MokaCache methods instead of deref doing the job. There's already custom methods available on Cache. Invoke these method instead of calling it on the deref of Cache.

@Chethan-rao Chethan-rao added the C-refactor Category: Refactor label May 17, 2024
@Chethan-rao Chethan-rao added this to the May 2024 Release milestone May 17, 2024
@Chethan-rao Chethan-rao self-assigned this May 17, 2024
@Chethan-rao Chethan-rao changed the title [REFACTOR] remove deref impl for Cache type [REFACTOR] remove deref impl on Cache type May 17, 2024
@Chethan-rao Chethan-rao linked a pull request May 17, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant