17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 2797 Views |
-
Silverstripe Static Caching

19 October 2008 at 5:53am
I was reading the post on the DNC static cashing code and I followed the documentation, however silverstripe kept on issuing an error stating that I was missing "FilesystemPublisher". Where do I get this and related files? Its not in cms/code/ ...
Thanks in advance for any direction.
-
Re: Silverstripe Static Caching

19 October 2008 at 3:53pm
You need to be using the latest trunk version of the code. Static publishing will be part of the new 2.3 release coming soon. You can download the latest development code on dailybuilds - http://dailybuilds.silverstripe.com/core-tarballs/
-
Re: Silverstripe Static Caching

20 October 2008 at 8:34am
Got the latest trunk which has FileSystemPublisher and SaticPublisher. I have just installed the standard site (wamp\www\sileverstripe) and edited wamp\www\sileverstripe\mysite\_config.php and added:
Object::add_extension("SiteTree", "FilesystemPublisher('cache/', 'html')");
How do I create the static copy of my site and into which directory will it go - wamp\www\sileverstripe\mysite\cache???
-
Re: Silverstripe Static Caching

20 October 2008 at 10:18am
to build the cache you run a script called dev/buildcache. You can do this via command line and sake or via the webbrowser by visiting http://www.site.com/dev/buildcache and this will output the contents of the rebuild to a folder called 'cache' on your sites top level (same level as cms, sapphire etc).
-
Re: Silverstripe Static Caching

20 October 2008 at 1:26pm
Tried it, but get a UserError (accessing site using http://localhost/silverstripe/dev/buildcache). Please define a method "allPagesToCache()" on your Page class...
What exactly should be in my wamp\www\sileverstripe\.htaccess? And do I need to and anything to wamp\www\sileverstripe\mysite\code\Page.php?
-
Re: Silverstripe Static Caching

20 October 2008 at 2:24pm
Because this is an unreleased feature we currently do not have full docs on it. You need to make the changes to your .htaccess file listed on http://doc.silverstripe.com/doku.php?id=staticpublisher also not listed there, but needed as you can see from your error msgs you need to define the 'cache' on your Page.php file and a few methods for it. Here is a bad example but it should describe the methods to recache every page
-
Re: Silverstripe Static Caching

20 October 2008 at 11:27pm
Thanks. I read / followed the directions in this link but there isn't a mention of what to put in the Page.php file. What should I put in this file? It is for this feature, staticpublish, that I chose this CMS. I really need to get it working.
-
Re: Silverstripe Static Caching

21 October 2008 at 12:01pm Last edited: 21 October 2008 12:03pm
It needs to go in your Page class (the controller part is only for the templates really). The static caching is all pretty beta code and we are working on the documentation in the coming weeks for it.
Sorry my last post was meant to have a pastie link - http://pastie.org/pastes/296003 with the basic good
| 2797 Views | ||
| Go to Top | Next > |


