GetInMemResult GetInMem(GetInMemArg tArg)
tArg. Operation execution parameters.
The GetInMem operation gets information about In-Memory cache in repository object.
The operation checks presence and status of In-Memory cache in repository cube or dictionary. To execute the operation, in the tArg.cache.object field specify object access parameters. The operation results in information about object cache presence and actuality.
NOTE. To provide correct work of the operation, cache files should be used only by the current server.
Below is the example of getting information about In-Memory cache in repository cube. The request contains cube moniker, the response contains information about cache.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"GetInMem" :
{
"tArg" :
{
"cache" :
{
"object" :
{
"id" :
{
"id" : "S1!M!5857"
}
}
}
}
}
}
{
"GetInMemResult" :
{
"meta" :
{
"cache" :
{
"isOK" : "1",
"object" :
{
"id" :
{
"id" : "S1!M!5857"
}
},
"objectStatus" : "Exists"
}
}
}
}
public static GetInMemResult GetInMemParams(MbId mb, string objectId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetInMem()
{
tArg = new GetInMemArg()
{
cache = new GetInMemCacheArg()
{
@object = new InMemCacheObject()
{
id = new OdId() { id = mb.id + "!" + FindObjectById(mb, objectId).k }
}
}
}
};
//Get information about object cache
var result = somClient.GetInMem(tGet);
return result;
}
See also: