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.

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

Dears,

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



83.4k
Accepted
answer

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.



83.4k

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 :)