[Mono-list] WebService CacheDuration not working?

Glen Ford glen.ford at spinvox.com
Thu Aug 31 08:24:37 EDT 2006


Hi,


Has anyone used [WebMethod(CacheDuration=n)] successfully?

It does not appear to cache (unless I am doing something really wrong) - 
I have tried the following with both xsp and through Apache/mod_mono, 
using the test forms and also using wget and using telnet handcrafting 
requests.



<%@ WebService Language="C#" CodeBehind="CacheTest.asmx.cs" 
Class="CacheTest.CacheTest" %>
<%@ Assembly Name="System.Web.Services" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace CacheTest
{
    [WebService]
    [SoapRpcService]
    public class CacheTest : System.Web.Services.WebService
    {
        private static int counter = 0;

        [WebMethod(CacheDuration=60)]
        public int cacheTestMethod()
        {
                return( ++counter );
        }

    }
}

Any ideas appreciated.


Regards,



Glen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20060831/e6c39b4b/attachment.html 


More information about the Mono-list mailing list