neilime / zf2-assets-bundle

AssetsBundle is a module for Zend Framework 2 allowing asset managment (bundling & caching)
https://neilime.github.io/zf2-assets-bundle/
MIT License
33 stars 20 forks source link

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

Closed JohnKimDev closed 11 years ago

JohnKimDev commented 11 years ago

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.

neilime commented 11 years ago

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

neilime commented 11 years ago

I made a commit that fix your issue