A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

Caching problems when using attributes?

Vote:
 

Hi!

I'm using attributes when creating blog-entries to separate blogs when listing them in "most recent-lists" etc. But when I've created a new entry I can't see it in my filtered list... Not until I change the parameter "pagesize" in the method "QueryHandler.GetQueryResult"!? Then it appears right away. Has anyone else noticed this beahavior? Workaround?

EntryQuery q = new EntryQuery();
IntegerCriterion blogTypeCriteria = new IntegerCriterion();
blogTypeCriteria.Value = ideaKey;
blogTypeCriteria.Operator = ComparisonOperator.Equals;
q["blog_type"] = blogTypeCriteria;

EntryCollection entries = QueryHandler.GetQueryResult<Entry, EntryCollection>(q, page, 100, out totalItems);

Best regards
Marcus

  

#29819
May 18, 2009 11:08
Vote:
 

Hi Marcus,

This is because the Query system will cache the result "forever" if don't specify a cache timeout. There is an overload of GetQueryResult where you can speify the timeout, use this instead.

Best regards,
Tom

#29824
May 18, 2009 14:23
Vote:
 

Hi Tom,

Thanks for your quick answer!

Best regards
Marcus

#29828
May 18, 2009 15:51
error This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.