Caching

Posts   
 
    
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 04-Oct-2013 16:18:47   

Is it possible to cache adapter RetrievalProcedures & FetchTypedView calls or is it just entity fetches via API/QueySpec/Linq?

The stored proc calls are mostly in our legacy data service.

Can't find anything about it in the documentation.

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Oct-2013 07:10:41   

Yes, it's possible if you map the SP resulset into a TypedView.

David Elizondo | LLBLGen Support Team
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 07-Oct-2013 09:45:52   

daelmo wrote:

Yes, it's possible if you map the SP resulset into a TypedView.

Hi David,

How do you cache typedviews? I can't find the syntax for that confused

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 07-Oct-2013 14:42:00   

You specify caching with the query, you can fetch typedviews with queryspec (see: http://www.llblgen.com/documentation/4.0/LLBLGen%20Pro%20RTF/hh_goto.htm#Using%20the%20generated%20code/QuerySpec/gencode_queryspec_generalusage.htm#typedview) and then simply specify on the queryspec query you use to fetch the typedview that you want to cache the resultset.

Frans Bouma | Lead developer LLBLGen Pro
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 07-Oct-2013 14:44:29   

Otis wrote:

You specify caching with the query, you can fetch typedviews with queryspec (see: http://www.llblgen.com/documentation/4.0/LLBLGen%20Pro%20RTF/hh_goto.htm#Using%20the%20generated%20code/QuerySpec/gencode_queryspec_generalusage.htm#typedview) and then simply specify on the queryspec query you use to fetch the typedview that you want to cache the resultset.

Thanks for that, I meant using the adapterbase fetchtypedview call (see below) but the QuerySpec way if fine, thanks for your help.


using (DataAccessAdapter adapter = new DataAccessAdapter())
                {
                    adapter.FetchTypedView(owners);
                }
                return owners;