Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Problem with cache (I think)
luiz@wise.com.br
#1 Posted : Thursday, April 29, 2010 5:33:52 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 3/4/2010(UTC)
Posts: 157
Location: brazil
I have a content folder associated with a Tag folder as category

i'm in the tagrepository and use this code in my method

Code:

var svc = Context.ContentService;
return svc.GetCategoriesByContentAndFolder(content.UUID, FolderName, "", "", null, 0, 100, CacheTime)
.Select(c => WriteModel(new Models.Tag(), c));


this returns all the tags associated to my content

but if i update the tags in this content doing this in the TagRepository

Code:

svc.RemoveCategoryFromContent(content.UUID, tag.UUID);//in a loop to remove all


and then adding again, but this in the contentRepository

Code:

var svc = Context.ContentService;
foreach (var item in tags)
{
svc.AddCategoryToContent(content.UUID, item.UUID);
}



then the first code reads the previous tags and not the actual saved, I need to restart the webserver to show the correct value

Shouldn't update the cache or clear it after the update methods?
jifeng
#2 Posted : Thursday, April 29, 2010 9:04:38 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
Yes, I think the cache is not cleared when the category was changed. Please do not cache the data right now, I will fix it in future.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
luiz@wise.com.br
#3 Posted : Thursday, April 29, 2010 10:35:07 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 3/4/2010(UTC)
Posts: 157
Location: brazil
how do I do not cache?
jifeng
#4 Posted : Thursday, April 29, 2010 10:59:03 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
Set CacheTime to null.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.056 seconds.