neilime/zf2-assets-bundle

LESSCSS files cache issue: Once LESSCSS file is rendered, the file is persistent even after removed from the config

JohnKimDev opened this issue · 2 comments

Issue: once adding a lesscss file from the config, even after removing lesscss file from config, it still render on the header.


 'assets' => array(
          'less' => array(
                __DIR__ . '/../../assets/test.less'
           ))

steps:

  1. adding a LESSCSS file like above, and check for the rendered header style
  2. remove the LESSCSS file (line #3 from above) from the config
  3. check for the rendered header style. the the CSS that was rendered from the step 1 still persistent. Only way to fix this issue is to clear the files from the public/cache folder and refresh the page.

Currently, the module doesn't care of removing assets files in config. It could be done by saving current config and check it if config has been changed. It would be a good behavior, I will think about that for the next developments or if someone make a pull request to cover this case.

Meanwhile you can use console tools : php public/index.php render, it empty cache dirctory and render all needed assets

I made a commit that fix your issue