My testing seems to indicate the cache isn’t used when using ResolveService inside another.
If I set a breakpoint in my Factory method in a unit test that runs the service 3 times, I get 3 calls of the factory method.
using (var service = base.ResolveService<OrgContractTotalsService>())
{
var cnt = (OrgContractTotals)service.Any(new OrgContractTotals() { OrgID = 0 });
... do stuff
});
[CacheResponse(Priority = -1, Duration = CacheExpirySeconds.DailyLoadIndicator)]
public class OrgContractTotalsService : Service
{
public object Any(OrgContractTotals req)
{
return OrgContractTotalsFactory.GetObject(req);
}
}