http://bugzilla.novell.com/show_bug.cgi?id=524460


           Summary: CacheDuration is not used on WebMethodAttribute
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: SLES 11
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web.Services
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us)
AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19

When I set the CacheDuration field on the WebMethod attribute for a ASMX web
service it has no effect.

Reproducible: Always

Steps to Reproduce:
1. Create a web service with CacheDuration set on the WebMethod attribute. 
Make sure the method either returns a random value or gives you an indication
in the logs whenever it is run.
2. Access the web service method several times within the time duration set as
the CacheDuration.
Actual Results:  
The web service method returns a different value every time and is executing
the method for each call.

Expected Results:  
The web service method should have return the same cached value each time and
the method should have only been executed once before being cached.

I posted on the forums about this and never received an answer.  Here is the
forum link: http://www.nabble.com/Caching-and-ASMX-tp23784902p23784902.html

In case that link doesn't work, here is the Web Service I created when trying
to isolate the problem:

TestService.cs
  using System; 
  using System.Web; 
  using System.Web.Services; 
  using System.Web.Script.Services; 
  using System.Web.UI; 

  [WebService] 
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 
  [ScriptService] 
  public class TestService : WebService { 
    [WebMethod(CacheDuration=200,EnableSession=true)] 
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
    public String time() { 
      return DateTime.Now.ToString(); 
    } 
  }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to