caching data to disk

64 views
Skip to first unread message

fractal76

unread,
Apr 22, 2012, 1:53:00 PM4/22/12
to Business Logic Toolkit for .NET
Does bltoolkit have any facility for caching data to disk?

For example we are loading a fairly large dataset over a slow network
connection. When doing development, the data is essentially static, so
it would be nice to be able to spool the dataset to disk once, and
then read it from there, until some flag is reset in the configuration
to re-read the data from the real datasource.

Nick Mokhnatov

unread,
Apr 23, 2012, 11:52:15 AM4/23/12
to blto...@googlegroups.com
IMO bltoolkit's goal is differ.
 
You can sync your global DB to local using any sync libraries or replication tools. Then you can operate with local DB using bltoolkit. In fact, for your purposes bltoolkit can act as perfect strongly-typed SQL mapper.
 
Best regards, Nick.
 

воскресенье, 22 апреля 2012 г., 21:53:00 UTC+4 пользователь fractal76 написал:

fractal76

unread,
Apr 24, 2012, 11:08:16 AM4/24/12
to blto...@googlegroups.com
Agree that what you are suggesting is a possible approach. However we have a pretty complex database topology with many linked servers, accessed via views etc.

So a lot of the data is joined and transformed into the structure consumable by the end application, so we just want to be cached this final data set and short-circuit the loading of the data, to essentially have bltoolkit (for methods marked with Cache attribute) to just load from local cache if it's available... (we can add a button in our app to save to disk/reset disk cache).

Nick Mokhnatov

unread,
Apr 24, 2012, 1:39:09 PM4/24/12
to blto...@googlegroups.com
way 1. Create basic accessor class that encapsulates local cache working routines. Then you can consume this routines in your real entity accessor classes and bltoolkit can helps you to stay your project in strong typization way.
 
way 2. May be in-memory tables can help you to solve your cache needs. In this case your local db is just .NET in memory collections of POCOs and it will operable using bltoolkit linq provider with easy.
 
best regards, Nick.
 
 
You can create accessor class for each your logical entity that can help to encapsulate local cache logics inside.
Reply all
Reply to author
Forward
0 new messages