Hi, You can always get the list of the all caches in cluster using Ignite.cacheNames() method.
Evgenii ср, 12 сент. 2018 г. в 13:26, Som Som <[email protected]>: > Hello > > > > I created new cache using thin .net client: > > > > public class TestEntity > > { > > public string ValueString { get; set; } > > > > public DateTime ValueDateTime { get; set; } > > } > > > > class Program > > { > > static void Main(string[] args) > > { > > var ignite = Ignition.StartClient(newIgniteClientConfiguration > > { > > Host = "127.0.0.1" > > , > > BinaryConfiguration = newApache.Ignite.Core.Binary. > BinaryConfiguration { Serializer = new Apache.Ignite.Core.Binary. > BinaryReflectiveSerializer { ForceTimestamp = true } } > > }); > > > > var queryEntity = new QueryEntity(); > > queryEntity.KeyTypeName =typeof(int).FullName; > > queryEntity.KeyType = typeof(int); > > > > queryEntity.ValueTypeName =typeof(TestEntity).FullName; > > queryEntity.ValueType = typeof(TestEntity); > > > > queryEntity.Fields = new QueryField[] > > { new QueryField("ValueString", typeof(string)) > > , new QueryField("ValueDateTime",typeof(DateTime)) > > }; > > > > var cache = ignite.GetOrCreateCache<int,TestEntity>( > > newCacheClientConfiguration( > "TestEntity", queryEntity) { SqlSchema = "PUBLIC" }); > > > > > > cache.Put(1, new TestEntity { ValueString ="test", > ValueDateTime = DateTime.UtcNow }); > > > > ignite.Dispose(); > > } > > } > > > > Then i tried to get this cache using typical .net client but instead of > cache I got an error “Additional information: Cache doesn't exist: > TestEntity”: > > > > class Program > > { > > static void Main(string[] args) > > { > > var ignite = Ignition.Start(newIgniteConfiguration > > { > > DiscoverySpi = new TcpDiscoverySpi > > { > > IpFinder = new TcpDiscoveryStaticIpFinder > > { > > Endpoints = new[] { "127.0.0.1" } > > } > > } > > }); > > > > > > var cache = ignite.GetCache<int, TestEntity>("TestEntity"); > > > > ignite.Dispose(); > > } > > } > > > > How can I get a cache correctly? >
