8

We are trying to implement SiteEdit on a DD4T enabled website and while trying to edit the content using SiteEdit we are facing a weird problem.

The changes in the preview are updated but only after a delay. That is, if we make changes to the content and immediately click "Update Preview" the changes are not reflected.

But, if we wait 20 to 30secs before clicking "Update Preview" the preview seems to get refreshed with the new changes.

We are unable to find the cause of this behaviour. We tried by disabling caching but to no avail. Any help would be appreciated...thanks in advance.

| improve this question | | | | |
5

This has everything to do with the different levels of caching built into the DD4T framework. The default caching strategy works as follows:

-Page/DCP is requested and thus cached

-The DD4T framework polls all the items in cache with a regular interval. This interval is configurable with this setting:

 <add key="CacheSettings_CallBackInterval" value="1" />

So for a XPM enabled website you want this to be 1. (Staging only!)

-A default, ABSOLUTE expirationsetting is added to each cached item.

I suspect the last one is messing things up. Luckily you can control that setting too with this setting:

<add key="DD4T.CacheSettings.Default" value="-1"/>

Setting it to -1 means: don't cache the item at all.

After setting above mentioned settings, XPM and DD4T work like a charm for me

| improve this answer | | | | |
  • Thanks Albert ..!!! This fixed the problem with "Update Preview". But now we are facing another issue. Once we exit SiteEdit by "Cancel Editing" the changes are reflecting on the pages even though we did not save the changes by "Finish Editing". Only if we close the browser and open the page again are these changes gone. Is there a way to make sure the changes are not reflecting after exiting SitEdit if we do "Cancel Editing" ?? – t2013 Nov 6 '13 at 9:51
  • It looks like you should ask that as a different question... – Nuno Linhares Nov 6 '13 at 13:41
  • For reference, the 'Cancel Editing' question has been asked (and answered) here: tridion.stackexchange.com/questions/3432/… – Jonathan Williams Nov 14 '13 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.