I have a web service with two public methods foo and faa. Neither are
cached.
I also have an internal method called cacheIt. This one is setup to be
cached.
If both foo and faa make calls to cacheIt, will the method cacheIt be
cached? Or must both foo and faa be cached?
cacheIt has the data that I want to cache.
thanks
I'm not sure what you call a "cached method". Data are cached not methods...
Both foo and faa will just get what cacheIt returned to them so if cacheIt
returns cached data, both foo and faa (or any other method that would call
cacheIt) will deal with what cacheIt returned that is cached data (anyway
they have no way to know what are the real data cached by cacheIt and no way
to overcome this cache ???)...
You may want to elaborate a bit as the context is unclear, what do you mean
by having "cacheIt setup to be cached" ? You perhaps talking about something
else than what I thought...
--
Patrice
>I have a web service with two public methods foo and faa. Neither are
> cached.
[quoted text clipped - 7 lines]
>
> thanks
JerryY - 03 Apr 2008 18:37 GMT
Thanks you your quick reply.
by method cache I mean in the
[WebMethod(Description=@"Log successful retrieval of manifest for given
rivision.", CacheDuration=300)]
You can set the cache duration.
My understanding is that as long as the method parameters do not change
between calls, the "page" is cached.

Signature
Jerry
> I'm not sure what you call a "cached method". Data are cached not methods...
>
[quoted text clipped - 22 lines]
> >
> > thanks
Patrice - 03 Apr 2008 18:55 GMT
Ah AFAIK it caches the XML response sent by the method to a client over
http...
Of course it won't have any effect if the method is not called throught a
webservice call but directly....
Remember also that you have server side caching available :
http://msdn2.microsoft.com/en-us/library/system.web.caching.cache.aspx
--
Patrice
> Thanks you your quick reply.
>
[quoted text clipped - 40 lines]
>> >
>> > thanks
JerryY - 03 Apr 2008 19:14 GMT
Yea I did the server side cache as a temp fix.
But that has it's own issues.
(appName is passed as a parameter)
DataSet ds = null;
Object obj = Context.Cache.Get(appName);
if (obj == null)
{
//if not present, create a new manifest for first time
ds = new DataSet();
ds.ReadXml(...);
Context.Cache.Insert(appName, ds);
}
else
{
ds = (DataSet) obj;
}
return ds;
If say I have 30 requests at the same time(first time service is started
up), the dataset is going to be created 30 times (because at that second when
30 requests are processed, the cache is empty) and the last one in is the one
that will be used in the cache. The 31st reqeust will use what is in the
cache.

Signature
Jerry
> Ah AFAIK it caches the XML response sent by the method to a client over
> http...
[quoted text clipped - 52 lines]
> >> >
> >> > thanks