Search

Exciting stuff. I managed to get this working, unfortunately it's not quite as easy as what I mentioned above, but still doable if someone would like to test it out in their environment. All these changes happen to the XsltProcess class.

Line 86

if($xsl) $this->_xsl = str_replace('./workspace/', '../../workspace/', $xsl);

Line 91

Change XsltProcessor to XsltCache

Line 122

Change XsltProcessor to XsltCache

Line 145

Comment out and replace with

$fp = CACHE . '/' . md5($xsl) . '.xsl';
$f = file_put_contents($fp, $xsl);
$XSLProc->importStyleSheet($fp);

XSLCache doesn't support dynamic templates, which is what Symphony uses to build pages, so to get around this and use a 'file' template, we're saving a a very simple template to the CACHE directory. The str_replace is necessary because Symphony usually uses the root as the base, so inside the CACHE folder won't match the same paths.

Actual benchmarks to follow.

Exciting stuff indeed! =)

Most shared hosts will not be able to use it since it's a modification of PHP itself, written in C.

Oh I know, it wouldn't be something in the core, this is just a nice extra bit that those implementing large sites with huge amounts of traffic could implement.

My initial local tests aren't very promising with XsltCache actually taking longer to handle requests. My test site isn't very complex though, so I'd like to test it tomorrow on something real before I post results :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details