cache question on a webservice
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I need to cache the results when this web method is called. It is a web service. here is the code WebMethod _ Public Function something() As String() Return _some.GetTesttFieldValues(_Groups.GetTestName("Something").Id, "Field3") End Function GetTesttFieldValues is a function. Public Function GetTesttFieldValues(ByVal SomeId As Integer, ByVal SomeName As String) As IEnumerable(Of String) Implements ISome.GetTesttFieldValues Dim query As New Query() query.SomeId = SomeId Dim documents As DocumentCollection = GetDocuments(query) Return (From d As Document In documents Select CType(GetType(Document).GetProperty(fieldName).GetValue(d, Nothing), String)).Distinct().ToArray() end function