Either

```
conn = Connection('example.com', 10800)
cache_put(conn, cache_id('my-cache'), 'a', 1)
```

or

```
conn = Connection('example.com', 10800)
my_cache_id = cache_id('my-cache')
cache_put(conn, my_cache_id, 'a', 1)
```

It is also possible to give parameters names, if you like to.

```
conn = Connection('example.com', 10800)
cache_put(conn, cache_id('my-cache'), key='a', value=1)
```

This should also work, but not recommended:

```
conn = Connection('example.com', 10800)
cache_put(conn, cache_id('my-cache'), value=1, key='a')
```

All variants can coexist in one user program.

On 07/26/2018 05:46 AM, Dmitriy Setrakyan wrote:
I am still confused. Let's work through an example. Suppose I have a cache
named "my_cache" and I want to put an entry with key "a" and value "1".

In Java, this code will look like this:


*IgniteCache<...> myCache = ignite.cache("my-cache");myCache.put("a", 1);*


How will the same code look in Python?

D.

Reply via email to