I'm working on a Relate+ site and making use of the custom attributes that are available on the community objects, specifically on the Topic object.
I have some functionality where it is possible to move a Topic from one club to another and when doing this I change the value of one of the attributes (create a clone of the original, set the values then call the UpdateTopic method using the ForumHandler). I can step through this and see the value of the attribute being changed and that it is the same once the UpdateTopic method is called.
However when I load the page that would contain the moved topic I see that the attribute value has not been changed as if it's being cached. When restarting the web app the topic has the correct attribute value so it seems the cache is updated.
I have tried using the RemoveCachedObject method using the CacheHandler in the hope that this will force a refresh but this makes no difference.
Has anyone else experienced this and know how to resolve?
Thanks in advance,
Well I finally worked this out, and after much frustration, I found two things that caused this.
Firstly, the code was doing the following
and removing the first call to UpdateTopic meant that all values were saved and updated in the cache as required.
I deduce from this (incorrectly maybe) that the first UpdateTopic updates the cache and prevents it being updated in the second call to UpdateTopic (which does actually update the underlying data just not the cache).
I'm not sure which is more ridiculous, the unneccessary first call to UpdateTopic or the fact that the cache is not updated each time this is called.
I hope this helps someone out in the future!