I was reading up on Static Publisher a little bit. I was wondering what caching SS is using by default in 2.4.5. Do I have to do anything extra to make it cache? It seems like for as long as I have used SS it has always created a cache folder in tmp or I can use silverstripe-cache and it does it automatically. What are the limitations or reasons for doing custom caching?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Well all that gets stored in the normal cache folder (as far as I know) are cached template files and they're only cached in the sense that they don't get recreated on every request. Static publisher creates html files of all your pages so all that gets served is static html without any database hits and it's insanely fast.
The limitations of static publisher are primarily that you can't have personalized content on the site since it saves one html file/page. However if you're doing simpler sites it's an awesome alternative.
I was wondering what caching SS is using by default in 2.4.5.
Out of the box SS caches compiled templates off the filesystem (stores it as parsed PHP) and it caches the 'manifest' file which stores all the paths to the classes you're using but neither of these allow SS to avoid hitting the database (they only cache a small part of the process).
Static publisher, like smurkas said, is awesome if you're not building complex, interactive sites as it completely avoids hitting PHP, Database (all the slow things) though partial caching is a huge step up from nothing and is much more flexible.