caching objects and data

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
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
 
Back
Top