Hi Jive,
we have set the short-term query cache to 5 seconds.
But replies to a discussion is displayed without delay. Allthought the says
Your message was posted successfully, but there will be a short delay before it is viewable in the thread."
Is there some configuration that we have missed?
I attached a small clip showing the behavior.
best regards,
Nils
Hello Nils,
If you look at thread.ftl it looks like it says this without condition if you have the short-term query cache enabled.
Regarding the fact that content posts instantly, what happens if you try to post another message immediately after posting a message? After 5 seconds, the cache is cleared of the query so the first message you post will put the query back in the cache. For 5 seconds after that, if you try add new content and refresh the page, you'll have to wait for the cache toe expire once more.
This cache would probably be a lot more noticeable if you had someone else posting to the discussion and you were constantly hitting the refresh button.
Cheers,
Brad
Thanks Brad.
brad.heller wrote
If you look at thread.ftl it looks like it says this without condition if you have the short-term query cache enabled.
That good. Since the FTL should get the cached content (without the new comment) and then refresh after 5 seconds.
Regarding the fact that content posts instantly, what happens if you try to post another message immediately after posting a message? After 5 seconds, the cache is cleared of the query so the first message you post will put the query back in the cache. For 5 seconds after that, if you try add new content and refresh the page, you'll have to wait for the cache toe expire once more.
This cache would probably be a lot more noticeable if you had someone else posting to the discussion and you were constantly hitting the refresh button.
I tried both. Commenting twice within the 5 seconds (I also changed to 10 seconds) always showed the comment directly to the commenter.
In another browser (other user) the changes show also nearly instantly, at least faster than the 10 secs.
Hello Nils,
So after exploring this code a bit more it looks like the query cache is used mostly for tracking counts for threads/messages/users in the discussions contexts as these counts are expensive operations. It looks like the only time it has anything to do with adding/creating/deleting content is in the root threads space, not for replies to threads, if that makes sense.
Cheers,
Brad
Hi Brad,
I did not get it, sorry.
Where is the short-term query cache used? And where not?
This is the situation:
A users replies to a thread and sees this text on the page
>"Your message was posted successfully, but there will be a short delay before
it is viewable in the thread."
But the page includes his reply. After 5 or 10 secs the page reloads with
the same content.
With a disabled short-term query the page loads without the text.
If the short-term query cache is not used for replies, the message should
not appear on replying.
Best regards,
Nils
Hello Nils,
Unfortunately, Brad left Jive last week, and I'm in the process of taking his cases. I'll take a look at this, and let you know my findings as soon as I can.
Thanks,
Kevin
Hi Nils,
Thanks for being patient. From what I've seen, the short term query cache is just another cache for database data, so any call that is looking for something that lives in the database will check the short term query cache first, fall through to the regular query cache, and then go to the database if it doesn't find the data in either of them. The reason for the short term query cache is this: we keep many lists. And caches are helpful for that. Problem is that the list is often edited while a copy of it is in the cache. So an item somewhere down the list goes to the top. So we nuke the whole copy of the list in the cache, and get it back from the db. That can suck for the user. The short term query cache helps with that problem like so: when a list is invalidated in the regular query cache, the short term query cache spawns a background thread to get that data and load it before you have to call for it again. That way we try not to spend as much time waiting for the newest version of the list. A forum thread as it is so far in the conversation can be seen as a list, and the short term query cache can help get a copy of the thread if it has been edited and dropped from the regular query cache at some point while you were viewing/editing/adding to it. The reason you're seeing it work so quickly is most likely because your copy of the forum thread is current with the actual thread when you edit, so it isn't a big deal. And honestly, I think the problem is load based. I don't think you'll be able to really reproduce the behavior for this cache to really take effect unless your system is under some serious load from users. Let me know if you have any other questions.
Thanks,
Kevin
Thanks Kevin.
Forgot to close this case.
- nils
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us