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

Save compiled volt files in Ram using memcache instead of saving them to hard disck


Is it possible to save the compiled volt file (the converted php version) directly to the ram using memcached or volt ?.

I tried to use \Phalcon\Cache\Backend\memcache but it save the final html which means that if the page has a dynamic content it always show the first saved version of the volt file.

Please advise


Volt does generate PHP files that are cached by a bytecode cache such as APC or ZendOptimizer+ so they are served from RAM as you need.

Thanks for reply.

I need to save them using memcached and as I told you above I tried to use \Phalcon\Cache\Backend\mimcache but it cache the final html not the generated compiled php.


We don't have an adapter called \Phalcon\Cache\Backend\mimcache

Hi, you can use RAMFS to serve files from RAM if you want. This can be a bit harder to set up, but it works like a charm :)