datasource caching with LLBLGenProDataSource

Posts   
 
    
noobix
User
Posts: 14
Joined: 06-Nov-2007
# Posted on: 07-Apr-2008 19:19:38   

Hello,

is it possible with your datasource control(s) to cache the data (eg. dropdownlist items) after the very first page request for the current user session?

How can I achieve that for all users not only the current session?

Setting CacheLocation="ASPNetCache" and ASPNetCacheDuration="60" doesn't seem to work as I expected, the data is retrieved from storage every time the page is requested.

Regards Tino

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 08-Apr-2008 09:36:57   

Which LLBLGen Pro runitme library version are you using? (consult the following thread for more info: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7720)

Would you please post a simple repro solution?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 08-Apr-2008 09:56:48   

Do you have a filter (SelectParameters) defined in the datasourcecontrol? If so, that causes the datasourcecontrol to fetch the data every time.

Nevertheless, a combobox is readonly. So you don't have to use a datasourcecontrol, as the data will never change. A datasourcecontrol is more overhead for your page, so I'd suggest to fetch the data, store it in the cache yourself and then bind the fetched set to the combobox manually.

Frans Bouma | Lead developer LLBLGen Pro
noobix
User
Posts: 14
Joined: 06-Nov-2007
# Posted on: 08-Apr-2008 10:19:46   

I'm using v2.5 final.

@otis: you're right, there is a filter defined ("enabled = true") in the SelectSarameters of the datasourcecontrol. I didn't know that would cause the refetch on every page request.

By "store it in the cache yourself" you mean the ASP.NET cache?

What about the MS Caching App. Block? How can I get it to work with LLBLGenPro? I'd be happy about some recommandations.

Thank you.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 08-Apr-2008 10:29:19   

By "store it in the cache yourself" you mean the ASP.NET cache?

What about the MS Caching App. Block? How can I get it to work with LLBLGenPro? I'd be happy about some recommandations.

For caching dropdownLists, I think it's better to fetch them as DataTables(TypedLists/DynamicLists) and as Frans/Otis explained you should store them in a Session variable or an Application variable if they don't change from user to another.

And you may use the ASP.NET cache framework for storing them too.