Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Static Publisher in 2.4.5


Go to End


3 Posts   1517 Views

Avatar
micahsheets

Community Member, 165 Posts

1 September 2011 at 7:07am

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?

Avatar
MarcusDalgren

Community Member, 288 Posts

1 September 2011 at 8:06am

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.

Avatar
Willr

Forum Moderator, 5523 Posts

3 September 2011 at 8:58pm

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.