3 Replies Latest reply on Feb 15, 2016 4:57 AM by stejas7

    Create Cache through Command Line

    stejas7

      Hello,

       

      How to create distributed-cache through Command line ?

       

      If you have any reference Please suggest me....!!!! 

        • 1. Re: Create Cache through Command Line
          rvansa

          Is the CLI chapter http://infinispan.org/docs/8.1.x/user_guide/user_guide.html#_create in the user guide insufficient in any way? You need to define a configuration template (in regular XML configuration) and later you can create caches that have this configuration.at runtime (using CLI).

           

          I hope those 4 exclamation marks are not necessary.

          • 2. Re: Create Cache through Command Line
            nadirx

            To create a cache using an existing configuration in domain mode:

             

            $ ./bin/ispn-cli.sh

            You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

            [disconnected /] connect

            [domain@localhost:9990 /] cd profile=clustered/subsystem=datagrid-infinispan/cache-container=clustered

            [domain@localhost:9990 cache-container=clustered] ./distributed-cache=mynewcache:add(configuration=default)

            {

                "outcome" => "success",

                "result" => undefined,

                "server-groups" => {"main-server-group" => {"host" => {"master" => {

                    "server-one" => {"response" => {"outcome" => "success"}},

                    "server-two" => {"response" => {"outcome" => "success"}}

                }}}}

            }

            [domain@localhost:9990 cache-container=clustered]

            • 3. Re: Create Cache through Command Line
              stejas7

              Thanks nadirx & rvansa.