hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[REFACTOR] remove `deref` impl on `Cache` type

Open Chethan-rao opened this issue 9 months ago • 0 comments

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 avatar May 17 '24 10:05 Chethan-rao