PC Review


Reply
Thread Tools Rate Thread

Caching data in C# middle tier component for use in VB COM

 
 
Ayoa
Guest
Posts: n/a
 
      18th Jun 2006
I have a c# assembly which i have exposed to a VB COM object.
Within the c# assembly, i implemented a singleton pattern which loads the
cached from the database if the cache is null. This data does not change
often but take long to load so i have cached it.

c#
private static RuleChecker myInstance;
private RuleChecker() //private constructor
{
cacheData();
}
public static RuleChecker getInstance()
{
if (myInstance == null)
myInstance = new RuleChecker();

return myInstance;
}

VB6 - that uses the c# app


Private guideline As Guidelines.RuleCheckerFacade
Private Sub Class_Initialize()
Set guideline = New Guidelines.RuleCheckerFacade
End Sub

Public Function GetAccounts(ByValid As Long) As Variant

GetAccounts = guideline.GetAccounts(id)

End Function
However in my VB application, it seem i have to re-cache the data every time
i re-start the VB executable.

I need this cache data to remain cache until i call a method to refresh it.
Do i have my design wrong? how can i cache data in middle tier object so i
use in multiuser COM object ?
Please help.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Caching below in the business tier or data tier?? Nemisis Microsoft ASP .NET 1 22nd Aug 2006 04:43 PM
Bad to use datareader in middle tier? Ronald S. Cook Microsoft C# .NET 5 7th Jun 2006 01:55 PM
Middle tier Data access object in .net assembly or COM? =?Utf-8?B?ZGF2aWQ=?= Microsoft ADO .NET 2 28th Jan 2006 03:20 AM
Data Access and Middle-Tier... Control Library or Web Services Dollar Microsoft ADO .NET 2 30th Nov 2005 09:13 AM
Resource in Middle Tier??? grawsha2000@yahoo.com Microsoft VB .NET 0 3rd May 2005 05:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 PM.