
Ask HN: Can you use apache cache for templating engine? - ge96
For a while I built websites by copying the same files&#x2F;folders into directories... seems pretty wasteful for example if every page uses the same layout.<p>Now it occurs to me I can echo out MySQL data that has the website itself in there as text. But even that is slow, I think it could be as long as 300ms, I should test it... I was looking at this briefly watching the network console tab in Chrome.<p>I am somewhat aware of templating engines like Twig. I know I&#x27;m working with ancient tech regarding LAMP.<p>I have not touched webpack&#x2F;node yet.<p>I was just starting to read up on Apache&#x27;s cache and I was wondering if this was a dead end&#x2F;not the right way to go. I saw that you could load files something about &quot;stale&quot;...<p>My question doesn&#x27;t really make sense because you still have to inject the content. My one attempt regarding PHP&#x2F;MySQL echo was to concatenate the parts like: head-section + body&#x2F;modular + close document. It works, though I have to see how fast&#x2F;if it&#x27;s better. It is better in not having redundant code.
======
ge96
I'm also trying to get over my stubbornness. I have mixed feelings with
adopting every new technology that comes along seeing as many come out quite
frequently. There's the learning curve/brief slow down in productivity like
trying to learn Vim.

Still I'm starting to see the flaws in my ways especially with being
inefficient/slow to deliver. Hence not being employed in this field full time.
Anyway, I'll find out I guess. At the time I'm not deploying large scale or
anything this is mostly for myself. I'm still based on a cheap single-core VPS
with domain-mapping.

