caching objects and data

G

Guest

Hi all, I am working on a component dll that could either br running in an
asp.net app domain or on a regular app domain. I have a need to cache some
frequently used objects and data. I know in asp.net I have access to a cache
object. What can I use to cache when not running in asp.net? I am a vb
programmer

TIA
 
A

Alvin Bruney [MVP - ASP.NET]

You can use the database, stateserver, a file etc. It may help to assign the
serializeable attribute to your classes to help with the
serialization/deserialization process.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 
G

Guest

Alvin, what I was getting at was I want to cache data from a database in
memory of the application server. I intend on having remotable objects
running on an app server that access the sql database. These objects will
not be hosted in IIS, rather through a custom service listener. So I believe
I will not have access to the asp.net cache objects. Everytime a client
makes a call to the remote object an instance will be created and destroyed.
So even if i declared a common member hashtable and used it as a cache to
store frequently accessed data that will not work. Any suggestions?

TIA

Alvin Bruney said:
You can use the database, stateserver, a file etc. It may help to assign
the serializeable attribute to your classes to help with the
serialization/deserialization process.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Hi all, I am working on a component dll that could either br running in
an asp.net app domain or on a regular app domain. I have a need to cache
some frequently used objects and data. I know in asp.net I have access to
a cache object. What can I use to cache when not running in asp.net? I am
a vb programmer

TIA
 
A

Alvin Bruney [MVP - ASP.NET]

Ok, how about storing the cache in the service itself as a static object or
static hashtable. As long as the service is running, the objects will be
avialable and you can call into the service to set and get data. I'd be
concerned about the performance though as I have seen this implemented with
disasterous results.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Alvin, what I was getting at was I want to cache data from a database in
memory of the application server. I intend on having remotable objects
running on an app server that access the sql database. These objects will
not be hosted in IIS, rather through a custom service listener. So I
believe I will not have access to the asp.net cache objects. Everytime a
client makes a call to the remote object an instance will be created and
destroyed. So even if i declared a common member hashtable and used it as
a cache to store frequently accessed data that will not work. Any
suggestions?

TIA

Alvin Bruney said:
You can use the database, stateserver, a file etc. It may help to assign
the serializeable attribute to your classes to help with the
serialization/deserialization process.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Hi all, I am working on a component dll that could either br running in
an asp.net app domain or on a regular app domain. I have a need to cache
some frequently used objects and data. I know in asp.net I have access
to a cache object. What can I use to cache when not running in asp.net?
I am a vb programmer

TIA
 
G

Guest

Why do you say it had disastrous results? Please shed some light on why this
method is not recommended.

thanks

Alvin Bruney said:
Ok, how about storing the cache in the service itself as a static object
or static hashtable. As long as the service is running, the objects will
be avialable and you can call into the service to set and get data. I'd be
concerned about the performance though as I have seen this implemented
with disasterous results.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Alvin, what I was getting at was I want to cache data from a database in
memory of the application server. I intend on having remotable objects
running on an app server that access the sql database. These objects will
not be hosted in IIS, rather through a custom service listener. So I
believe I will not have access to the asp.net cache objects. Everytime a
client makes a call to the remote object an instance will be created and
destroyed. So even if i declared a common member hashtable and used it as
a cache to store frequently accessed data that will not work. Any
suggestions?

TIA

Alvin Bruney said:
You can use the database, stateserver, a file etc. It may help to assign
the serializeable attribute to your classes to help with the
serialization/deserialization process.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Hi all, I am working on a component dll that could either br running in
an asp.net app domain or on a regular app domain. I have a need to
cache some frequently used objects and data. I know in asp.net I have
access to a cache object. What can I use to cache when not running in
asp.net? I am a vb programmer

TIA
 
A

Alvin Bruney [MVP - ASP.NET]

Not necessarily not recommended. I've seen it go horribly wrong at one
company I worked. After a few hours of running fine, the cache update
suddenly started taking 15minutes to return data. I didn't look into the
reason why so I don't exactly know why it was misbehaving. I just thought I
would point it.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Why do you say it had disastrous results? Please shed some light on why
this method is not recommended.

thanks

Alvin Bruney said:
Ok, how about storing the cache in the service itself as a static object
or static hashtable. As long as the service is running, the objects will
be avialable and you can call into the service to set and get data. I'd
be concerned about the performance though as I have seen this implemented
with disasterous results.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Alvin, what I was getting at was I want to cache data from a database in
memory of the application server. I intend on having remotable objects
running on an app server that access the sql database. These objects
will not be hosted in IIS, rather through a custom service listener. So
I believe I will not have access to the asp.net cache objects. Everytime
a client makes a call to the remote object an instance will be created
and destroyed. So even if i declared a common member hashtable and used
it as a cache to store frequently accessed data that will not work. Any
suggestions?

TIA

"Alvin Bruney [MVP - ASP.NET]" <www.lulu.com/owc> wrote in message
You can use the database, stateserver, a file etc. It may help to
assign the serializeable attribute to your classes to help with the
serialization/deserialization process.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Hi all, I am working on a component dll that could either br running
in an asp.net app domain or on a regular app domain. I have a need to
cache some frequently used objects and data. I know in asp.net I have
access to a cache object. What can I use to cache when not running in
asp.net? I am a vb programmer

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Caching architecture question. 1
Caching data 6
Cache class 1
Caching alternatives to ASP.NET cache 2
ASP.Net Caching Questions 6
Caching a sqlconnection 7
Using Caching properly 1
Bypassing Disk Caching 1

Top