Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.12 KB

File metadata and controls

37 lines (28 loc) · 1.12 KB
title clear-cache!
scope module
kind reference
category reference
aliases
respo.core/clear-cache!
clear cache
entry_for
hot reload
clear render cache

clear-cache!

📚 Documentation Index

clear-cache!

Respo has two copies of caches inside for the purpose of:

  1. DOM diffing
  2. speed up rendering

The first one is easy to understand since virtual DOM is corresponding to the DOM we currently see in the page. That's why it's cached.

The second one is for rendering, maybe I should explain it in shouldComponentUpdate-like process. Most times this virtual DOM is same with the previous one for diffing. But during hot code swapping, it's not. DOM state is updated, however, caches should be removed. That's why there's a second one.

clear-cache! is to clear the second cache, during hot swapping.