Anyone get Silverlight Ria Domain Service OutputCaching to work?

I am trying to use client-side caching in silverlight by beautifying a domain service in an RIA service, for example:

[OutputCache(OutputCacheLocation.Client,3600,UseSlidingExpiration = true)]
public IQueryable<State> GetMyStates()
{
    return entities.States;
}

I also use DomainDataSource with a filter:

<riaControls:DomainDataSource.FilterDescriptors>
 <riaControls:FilterDescriptor  
    Operator="StartsWith" 
    PropertyPath="StateCode" 
    Value="{Binding ElementName=txtElementName, Path=Text}" />
</riaControls:DomainDataSource.FilterDescriptors>

and I don’t see any observable caching effects that return to the data source both for any filter change and for each page refresh.

Has anyone received client-side caching for working with domains?

+3
source share
1 answer

, LINQ. , , , .

[OutputCache(...)]
public IQueryable<State> GetMyStates(string stateNamePart)
{
  return entities.States.Where(st => ...);
}

OutputCaching - RIA, LINQ .

+3

Source: https://habr.com/ru/post/1782297/


All Articles