Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Clearing the cache View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
slycknick - 6/26/2009 9:24:39 AM
   
Clearing the cache
This is probably a stupid question but how can I clear the cach for a single item.

My problem is I have added an additional column to com_customer. This column is changed by an external process that happens in the background and I want to be able to get the latest value but the GetValue() command gets a cached value. I can clear the whole cache using CacheHelper but that's a bit extreme.

I think the value is in a hash table 'Customers - User ID' but I've no idea how to clear this.

Any ideas?

Nick

User avatar
Member
Member
kentico_pavelk - 7/2/2009 7:15:34 AM
   
RE:Clearing the cache
Hi Nick,

This data is stored in hashtable so you can clear this hashtable by using CMS.CMSEcommerce.CustomerInfoProvider.Clear(). However, this hashtable is filled everytime when there is a request for data of any customer. So I would recommend you to use our API in your external process. You can call GetCustomerInfo method for getting the info and after modification you can call SetCustomerInfo method. This will update hashtable automatically.You can find details about using API outside CMS Project in our Developer's guide:
http://devnet.kentico.com/docs/devguide/index.html?using_api_and_cms_controls_outside_cms_project.htm


Best Regards,
Pavel Knotek