Search

For one site I use a lot of External XML Datasources (I basically use another Symphony install as a remote DB with various 'sattelite sites').

Obviously I've set up caching for these External Datasources but this poses a usability issue. Editors run into the issue that they cannot 'preview' their changes on the satellite site.

They add/change some content on the CMS site and want to see how it looks on the satellite site, but obviously they cannot directly preview their edit since the new content only shows up when the cache is refreshed.

Is there a way around this? Is it possible, for example, to bypass caching with some url parameter? Or maybe set a default caching timeout of '1' when a user access a page and is logged in?

The alternative would be to build in some form of WYSIWYG previewing in the data CMS site, but this is seems a hassle and is never really WYSIWYG.

I imagine you can customise the DS yourself to bypass caching. In the grab function, before it includes the data source logic, try:

if($_GET['bypass'] == 'yes') $this->dsParamCACHE = 0;

If you pass ?bypass=yes on the URL, the cache timeout is set to 0 at runtime. This should bypass caching entirely. I'm making the assumption that the caching class in Symphony ignores caching if the timeout is zero or a negative number.

Thanks Nick: that's something I can quickly test and, if it works, is a very simple solution (apart from the fact that it makes the DS'es [editing] quite 'fragile' :)

Yes... be sure to remove the allowEditorToParse function from the DS too. That will prevent you being able to edit it through Symphony's UI thereby overwriting the changes.

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