decentdao / decent-interface

Your Safe, Superpowered
https://app.fractalframework.xyz
MIT License
12 stars 6 forks source link

Remove Safe SDK Caching layer #2037

Open adamgall opened 1 week ago

adamgall commented 1 week ago

What do you think about getting rid of this caching layer completely? I'd prefer if we didn't need to rely on it, and just wrote tighter code in the places where we use this SDK so as to not bombard it with too many unnecessary requests.

_Originally posted by @adamgall in https://github.com/decentdao/decent-interface/pull/1977#discussion_r1647711515_

mudrila commented 5 days ago

There's way less caching happening now and existing logic sounds reasonable. I also renamed from Caching to Enhanced. One reasonable change though is to have 1 instance of safeAPI re-used across components through context. Currently each useSafeAPI usage creates new instance which is probably resulting in slower performance. @adamgall WDYT?

adamgall commented 5 days ago

Yep, I agree with both of your suggestions: