Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Web Service with permanent object cached? (http://www.velocityreviews.com/forums/t785626-web-service-with-permanent-object-cached.html)

df 12-06-2005 04:36 PM

Web Service with permanent object cached?
 
Hi,

I have a question: is ist possible to write a web service which gets a
cached "permanent object" right on initialisation?
Let me point out my example: My web service needs a rsa-key. This key
is stored in a file on the server. Every time I create a new instance
of the web service, the constructor code is processed and the key is
read from the file. Is it possible to enable some kind of caching to
avoid the file access? Or is there a more global constructor so that
the file is read only once?

Thank you in advance.

Dominik


GCR 12-07-2005 10:25 AM

RE: Web Service with permanent object cached?
 
Have you considered placing the code in the Global.asax, under the
Application_Start event handler? This way you read your key only when the
first instance of your service is created...

"df" wrote:

> Hi,
>
> I have a question: is ist possible to write a web service which gets a
> cached "permanent object" right on initialisation?
> Let me point out my example: My web service needs a rsa-key. This key
> is stored in a file on the server. Every time I create a new instance
> of the web service, the constructor code is processed and the key is
> read from the file. Is it possible to enable some kind of caching to
> avoid the file access? Or is there a more global constructor so that
> the file is read only once?
>
> Thank you in advance.
>
> Dominik
>
>



All times are GMT. The time now is 10:21 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.