Serving the Quantitative Finance Community

 
User avatar
Charlie
Topic Author
Posts: 0
Joined: February 7th, 2002, 8:51 am

Caching Applications Block and other Scary Things

November 26th, 2004, 2:35 pm

A totally non-financial question!I need to retrieve data from a database (at the moment Access, but moving to SQL). I don't want to have to wait to re-retrieve the data every time I encounter a small bug in my code. So I though of using a cache.ASP.NET cache seems easy enough to use. However it seems to be constrained to the application scope - i.e. when my programme ends, so does the cache's life.I worked out how to create a windows service, thinking that this would solve my problems. But it didn't. In fact I am now very confused as to what use the windows service has - other than sending commands identified by an integer, i don't seem to be able to communicate with it - e.g. to retrieve a cache!Microsoft Caching Application Block is very very very complicated (at least the example file is). However it does seem to do a little of what i would like it to do, by caching everything into a local instance of SQL Server. However that leaves me back where I began - with my data in the database.Any wonderful ideas? I've got enough problems with my econometric analsysis side of the code!!!!!thankscharlieMicrosoft Cachine Application Block and Architecture Guide
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Caching Applications Block and other Scary Things

November 26th, 2004, 2:51 pm

you can use disconnected recordsets ...BTW whay do you have bugs :-(
 
User avatar
Charlie
Topic Author
Posts: 0
Joined: February 7th, 2002, 8:51 am

Caching Applications Block and other Scary Things

November 26th, 2004, 3:03 pm

Hello. thanks for the quick reply.Disconnected recordsets are ADO technology. I am using C# and ADO.NET. My understanding is that a dataset in ADO.NET is disconnected anyway. I could serialize the object to disk as xml (or some other format) and make it a shared file (protected using mutexes), but it seems to me that this will slow things down? All that reading from file. Is this what you were implying? If I keep it in memory then I am back to the same problem of needing a cache that is independent of my application.As for bugs. i guess i could have said numerical instability due to the numerical precision imposed by my computer. Of course i don't have bugs! ;-)Charlie
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Caching Applications Block and other Scary Things

November 26th, 2004, 3:28 pm

So, should be OK now?> As for bugs. i guess i could have said numerical instability due to the numerical precision imposed by my > computer. Of course i don't have bugs! ;-)O happy day
 
User avatar
Charlie
Topic Author
Posts: 0
Joined: February 7th, 2002, 8:51 am

Caching Applications Block and other Scary Things

November 26th, 2004, 3:45 pm

Microsoft also have no bugs. Surely this is common knowledge?!QuoteSo, should be OK now?hmmm. i wish. caching isn't my bug problem, it is just a BUG bear! but no, caching is still not implemented (apart from one i wrote myself) have a good weekend
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Caching Applications Block and other Scary Things

November 26th, 2004, 3:50 pm

have a good weekend You2I'll ask our DB guru. Can you specify your problem as succintly as possible and I can give it to him?