Repository navigation
fix: 优化image和video缓存机制 - #3345
Conversation
|
你好 @xxxxZ-zhang,非常感谢你的贡献. Hello, @xxxxZ-zhang, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes. |
There was a problem hiding this comment.
Code Review
This pull request introduces a prefixed caching mechanism for media assets by adding a getCacheKey utility and updating the ImageRenderer, VideoRenderer, and asyncDrawImage functions. The review identified regressions in cache handling: the updated logic fails to account for cached null values (indicating previous load failures) and fallback images, which leads to redundant network requests. Suggestions were provided to restore proper handling for these cases to ensure performance and consistency.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## next #3345 +/- ##
==========================================
+ Coverage 75.77% 78.54% +2.77%
==========================================
Files 257 224 -33
Lines 11994 12544 +550
Branches 2464 2852 +388
==========================================
+ Hits 9088 9853 +765
+ Misses 1398 975 -423
- Partials 1508 1716 +208 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Size Change: +220 B (+0.03%) Total Size: 745 kB 📦 View Changed
ℹ️ View Unchanged
|
5051ad8 to
dc51b99
Compare
Co-authored-by: 张斌 <zb01704480@antgroup.com>
👀 PR includes
✨ Feature
🎨 Enhance
🐛 Bugfix
🔧 Chore
📝 Description
现状:一个链接为视频的字段设置渲染为图片,在单元格中会渲染兜底图,此时不刷新页面更新设置为视频渲染,由于缓存的关系,仍然渲染的是兜底图
🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge