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

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Compiling templates to cache instead of a file

This one has been bugging me for w long time now. All volt files are compiled and saved in the "compiledPath" folder. Is it possible to change that somehow to a proper cache system? Like Memcache or wincache or something? So every time volt compiles a new template, instead of writing the output php into a file, it would go into memory.

I was thinking abot maybe writing a custom compiler that extends volt etc but that would probably impact the performance even more.

Thanks



98.8k
Accepted
answer

If you use APC or Zend Optimizer they're in memory always.



15.0k

I guess thats a fair point.