Bypass External XML Datasource Caching?
This is an open discussion with 3 replies, filed under General.
Search
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.
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.