Question
· Jan 23, 2019

How to Call a Cache Routine from the .NET Cache Client using C#

Hi All,

Is it possible to call a Cache Routine using the .NET Cache Client instead of just SQL statements?

If so, can someone provide an example?

using InterSystems.Data.CacheClient;
using InterSystems.Data.CacheTypes;

Thanks,

-Matt

Discussion (3)1
Log in or sign up to continue

You could use the feature that any Classmethod may also serve as Stored Procedure.

Like this:

Class User.Remote
{
ClassMethod Echo(inout As %String) As %String [ SqlName = Demo, SqlProc ]
return "Echo:"_inout }
}

And then you may call your Procedure like this: getting back

SELECT DEMO('hello WORLD') 

getting back   

Echo:hello WORLD

All you have to care for is to return something.
what happens inside your ClassMethod is up to you and doesn't need to be related.