Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Director::test() saves results for next call?


Go to End


2 Posts   2182 Views

Avatar
FlorianH

Community Member, 33 Posts

1 July 2009 at 7:51pm

Edited: 01/07/2009 7:52pm

Hello there,

I need to call the Director::test() method several times for one DataObject (with different Actions) during my own export function and it seems that Silverstripe saves a DataObject::get() result within an function in my DataObject and uses it for the next time. This only occurs when calling the Controller of the DataObject with the Director::test() method (using a rule in the cms/_config.php), if I open the page in a Browser I see that with every refresh the function works correctly without caching any results.

Any ideas?

FlorianH

Avatar
FlorianH

Community Member, 33 Posts

2 July 2009 at 12:17am

Disabling the cache Parameter in the DataObject::get_one Method did the trick.