Jump to content

Twig templates and ProCache


Jan235
 Share

Recommended Posts

Hello,

I'm started to play around with processwire. And I like it! My local dev system is up and runnig. I'm using the template factory with Twig. Anybody who use Twig and ProCache or is it possible to use both modules?

Thanks in advance

Link to comment
Share on other sites

Yes. Unless I'm utterly wrong. ;) 

Twig will render PHP files at runtime, and their output in the browser is the same output that's processed by ProCache. ProCache will render static version of the pages in /assets/ProCache-xxxxx/page-name/index.html that will be server by .htaccess rules (or Nginx rules, like I do)

  • Like 1
Link to comment
Share on other sites

2 hours ago, Jan235 said:

Hello Sergio! Thanks for your fast reply. That means that ProCache generate static assets from the used .php and .twig files and deliver the static assets per .htaccess rewrite rules?

That's correct. The output from Twig is cached as static file and if present, ProCache directly serves this via .htaccess.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...