We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Asset Manager

Hi, I'm using the following assets manager collection.

My question, is Assets manager will delete the file in the target path and create the new one for each request?

The issue I'm facing is, when I start load testing with jMeter on my app, some time I get broken page, while debugging I watch on assets dir

watch -n1 -d "ls -all /home/app/public/cache"

and noticed that the files size of my assets (commons.js, common.css, footer.js) is time to time equals to 0. So, it's looks like Assets Manager purge the assets files time to time? Or what I'm missing here?

private function initCommonJSCollection()
            ->addFilter(new \Phalcon\Assets\Filters\Jsmin());

        // In case of IE8 load the IE8 fonts
        if ($this->di->getBrowserInformer()->isIEOld()) $this->assets->collection('commonCss')->addCss('css/ie8-extras.css');

            ->addFilter(new \Phalcon\Assets\Filters\Cssmin());

            ->addFilter(new \Phalcon\Assets\Filters\Jsmin());


Because you wrong in directory permissions set, may be. You can open your cache directory for user nginx.


The cache dir have a 777 permissions.