LLBLGenPro DataSource(Self Servicing) CacheLocation behavior

Posts   
 
    
Makhaly_cs avatar
Makhaly_cs
User
Posts: 27
Joined: 12-Jan-2009
# Posted on: 28-Sep-2011 22:39:18   

Dear ALL;

I need to know more about the behavior that the LLBL Gen Pro DataSource Component take when its CacheLocation property is set to ASPNetCache.

For Example i have two pages that contains two LLBL Gen Pro DataSources and their CacheLocation property is set to ASPNetCache.

Does the two read from** one cache location **or every one has it own cache location?.

Please advise...

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Sep-2011 05:12:11   

If the CacheLocation is set to ASPNetCache, the data is stored in the ASP.NET Cache using the following key: __LLBLGENPRODATASOURCEDATA_Guid so there will be two keys if you are using two LLBLGenProDataSource controls. For more info read Caching of Data.

David Elizondo | LLBLGen Support Team
Makhaly_cs avatar
Makhaly_cs
User
Posts: 27
Joined: 12-Jan-2009
# Posted on: 29-Sep-2011 08:46:30   

But this is not the right way. Suppose we have 2 DataSources that map two a basic EntityCollection that its data does not change. Every Page that have the DataSource will Write to a cache location two times and read from it again.

Suppost you put this DataSource in more than 10 Pages, It will affect performance and the data does not change between pages.

Please add a property to the LLBLGenProDataSource control that takes the ASP.Net Cache location.

Thanks a lot...

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Sep-2011 11:15:34   

Suppost you put this DataSource in more than 10 Pages, It will affect performance and the data does not change between pages.

This should not affect performance but rather the memory usage. Anyway, I assume you are using these dataSources for LookUps (data which rarely changes), right?

i.e. you are using them for read-only purposes. I'd rather not use DataSources in this situation, I suggest you load these lookups into Application variables on Application_Starts, so you have one memory location for each lookUp, then you can load the Data Controls from the Appplication variables.

You can also use AJAX-WebMethods to load controls asynchronously.