ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Shtykh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-5229) Specify caches when using Redis protocol
Date Tue, 13 Jun 2017 09:02:01 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-5229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16047613#comment-16047613
] 

Roman Shtykh commented on IGNITE-5229:
--------------------------------------

[~anovikov]
1. Yes, you are right, I use "redis-ignite-internal-cache-0" instead of "redis-ignite-internal-cache"
for the template, because
- 0 is a default database
- If I specify it in XML, it is created on start (I don't want to have "redis-ignite-internal-cache"
created and then create another "redis-ignite-internal-cache-0" as the default one).
I think it should be ok, since I will write about it in the documentation.


2. How did you run examples? If you specify "redis-ignite-internal-cache-0", it works as expected.


3. {{r = redis.StrictRedis(host='localhost', port=11211, db=0)}}
is supported. Basically, it's the same SELECT command done on connection.


4. As to {{org.apache.ignite.Ignite#addCacheConfiguration}},
do you propose to do this?
{code}
CacheConfiguration ccfg = new CacheConfiguration(GridRedisMessage.DFLT_CACHE_NAME);

ccfg.setName(cacheName);

ctx.grid().addCacheConfiguration(ccfg);
ctx.grid().getOrCreateCache(ccfg);
{code}
Can you please explain what the difference is if I call {{org.apache.ignite.Ignite#addCacheConfiguration}}
and if not?

> Specify caches when using Redis protocol
> ----------------------------------------
>
>                 Key: IGNITE-5229
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5229
>             Project: Ignite
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Roman Shtykh
>            Assignee: Roman Shtykh
>              Labels: redis
>             Fix For: 2.1
>
>
> Currently there's no way to switch caches -- all requests go to 'default'.
> _Note that this is the switch needed only for a subset of Redis data structures (currently
only STRINGs) -- for SETs and HASHTABLEs caches will be specified as keys (see IGNITE-5241)_
> The solution to be implemented:
> 1. A user specifies the cache configuration (template) with predefined name ‘redis-ignite-internal-cache’
> 2. Then issues ‘SELECT n’, and uses ‘redis-ignite-internal-cache-n’.
> Caches are configurable by providing a template.
> http://apache-ignite-developers.2346864.n4.nabble.com/Changing-cache-name-when-using-Redis-protocol-td17727.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message