Is my operation right? (Cache $loader into file or memcached)

I use registerDirs to register a lot of classes, the documentation says:

This option is not recommended in terms of performance, since Phalcon will need to perform a significant number of file stats on each folder..

So, I want to cache the loader in file or memcached, is this necessary?



6.1k

why not use registerNamespaces ? you can even autoload whole project if you are using PSR4 standard



3.3k

Thanks. My project almost complete soon. So I want to check some potential performance issues. If I cache the loader, will the performance be up?

why not use registerNamespaces ? you can even autoload whole project if you are using PSR4 standard



10.4k

Thanks. My project almost complete soon. So I want to check some potential performance issues. If I cache the loader, will the performance be up?

why not use registerNamespaces ? you can even autoload whole project if you are using PSR4 standard

Search file from disk is the short board of performance, so the best practice of optimaization is to kill the short board. cache the loader is make no sense of this.