Basic Cache Operations

03/02/2023

Getting an Instance of a Cache

Bir cache üzerindeki tüm işlemler, bir IgniteCache instance’ı aracılığıyla gerçekleştirilir. Mevcut bir cache için IgniteCache oluşturulabilir veya dinamik olarak bir cache oluşturulabilir.

⌨️ .NET Sample
IIgnite ignite = Ignition.Start();

// Obtain an instance of cache named "myCache".
// Note that generic arguments are only for your convenience.
// You can work with any cache in terms of any generic arguments.
// However, attempt to retrieve an entry of incompatible type
// will result in exception.
ICache<int, string> cache = ignite.GetCache<int, string>("myCache");

Creating Caches Dynamically

Dinamik olarak bir cache de oluşturulabilir;

⌨️ .NET Sample
IIgnite ignite = Ignition.Start();

// Create cache with given name, if it does not exist.
var cache = ignite.GetOrCreateCache<int, string>("myNewCache");

Daha fazla bilgi için…

Last updated

Was this helpful?