Skip to content
Related Articles

Related Articles

Improve Article

Why does SASS cache folder is created ?

  • Last Updated : 01 Jul, 2020

CSS is used to style and design web pages and in general improve the User Interface and Experience of a web page. The Development of such CSS design templates involves making the resources for CSS and then writing the code after which testing is done. Testing involves compiling the program before executing it. This compilation of CSS resources and code can take up some time. 

SASS and the cache folder: Sass is a CSS pre-processor that is fully compatible with every version of CSS. Sass reduces the repetition of CSS and therefore saves time in writing CSS code.

The SASS cache folder was introduced to reduce the time taken while compiling and recompiling multiple times while developing and testing the CSS program. When the parts of a template don’t change during the previous compilation, the current one could be compiled and cached. During recompiling, it takes less time to load this previously compiled data from a cache file of the parts of the template that wasn’t changed during the compilation in comparison with the last compilation.

Working of the cache folder: This SASS folder caches the partials and templates in chunks. While recompiling the template, the system compares these cached chunks with the new template that is being compiled and the system only re-compiles the parts of the template in which changes have been done. The rest of the unchanged parts of the templates don’t need to be re-compiled again as the system will just use the cached previously compiled parts and copy it over to create the new compiled file, effectively saving processing power and time.

Deleting the SASS cache folder: The SASS cache folder can be deleted, as it is basically cached files. It will get re-created on the next compilation. However, if one is recompiling new files of some template, it may take a longer time because the system will have to recompile the entire template, instead of only the changed parts.

My Personal Notes arrow_drop_up
Recommended Articles
Page :